György Schöpflin, a member of Parliament's foreign affairs committee, mentioned the idea on Twitter.
He was responding to criticism of some people who have put masks made from root vegetables on the border fences - apparently to try to ward off migrants.
He is alleged to have said that "a pig's head would deter more effectively."
The deputy, however, was quickly condemned for his comments, with Human Rights Watch director Andrew Stroehlein saying, "Refugees are fleeing war and torture. Your root vegetable heads will not deter them."
Stroehlein accused the MEP of spouting "xenophobic filth".
"Your words are disgusting. I expect that from anonymous neo-Nazi trolls. But you're an MEP. Act like one," he told Schöpflin.
"Your sick call for pig heads to try to scare desperate people fleeing wars? That's how an MEP should talk?"
Schöpflin later appeared to backtrack, tweeting: "Mine was a hypothetical, a thought experiment. Nothing to apologise for."
Hungary, as well as Macedonia and Croatia, has erected fences topped with razor wire to try to stop refugees crossing into the country.
Earlier this year it also threatened to veto European and Turkish leaders' landmark "one in, one out" deal aimed at halting illegal immigration to Europe.
Meanwhile, Ankara's migration deal with the EU could be one of the casualties of last month's failed coup in Turkey.
Under the deal, Turkish President Recep Teyyip Erdoğan promised to cut the flow of hundreds thousands of refugees and migrants from Syria, Afghanistan, Iraq, Iran and other countries in the Middle East and Africa who were flooding across the Aegean Sea from Turkey to Greece.
In return, the EU agreed to grant Turks visa-free travel throughout the 28 nation bloc, but only if Turkey cleaned up its conduct on human rights.
The deal, which has cut the flow of migrants substantially, could now be at risk following the post-coup crackdown ordered by Erdoğan.
"Since the coup, at least 17,000 people have been arrested and tens of thousands have been suspended from their jobs," said Michael Wohlgemuth of the Open Europe think tank in Berlin.
"This purge is pretty much the opposite of what Erdoğan promised so I don't see how this deal can survive," he said.
The EU is reportedly set to withdraw the offer of visa-free travel in October and the Turkish government has made it clear the whole deal would then collapse.