"Any European country that applies this directive ... well we won't cut off ties but it's simple, at the very least, our oil will not reach these countries," he said.
Venezuela sends few immigrants to Europe but Chavez's comments will support regional allies such as Bolivia and Ecuador who have thousands of citizens living in European countries such as Spain.
Chavez's comments were echoed by Evo Morales, the Bolivian president, who also said on Wednesday that the new legislation was "racist."
"We, too, could say that we are going to expel those who have looted and stolen from us, those who imposed policies of hunger and misery, those who exported illness, exploitation, discrimination," Morales, himself an indigenous Aymara Indian, said.
|Bolivia's Evo Morales called the new EU legislation "racist" [EPA]
Chavez also warned that should European nations begin jailing illegal immigrants from Latin American nations "then we're going to make our own list of companies from that country that have investments in Venezuela".
Chavez has already nationalised several foreign companies in Venezuela, turning them into joint ventures controlled by the state.
Venezuela sells most of its oil to the United States but is only a small supplier to Europe.
Despite frequent tensions with the US, Chavez generally has better relations with Europe.
Venezuela has sought in recent years to diversify the country's oil customers by selling oil to Europe and China.