Police believe he did it intentionally, growing increasingly desperate after days trapped on the border.
Holding the man's body, a group of Moroccan men moved towards the border crossing with cries of "Allahu akbar" (God is greatest). Greek police fired tear gas to push them back.
"We have been here for five days," said Mohammed, also Moroccan. "We have no food and we are cold. Why won't they let us through? Aren't we human? We are not terrorists."
With Macedonian authorities only letting through refugees from Syria, Iraq and Afghanistan, migrants from other countries have been blocked on the border with Greece for days, some of them for weeks.
Their anger boiled over yesterday. Groups of migrants seized communal tents operated by humanitarian agencies and destroyed some prefab houses set up by the United Nations refugee agency.
"We were attacked at dawn. Our safety was in jeopardy, so we decided to move out and see how the situation evolves," said Antonis Rigas, head of the Doctors Without Borders (MSF) mission to the area.
"International organisations and NGOs are advised not to enter the camp for security reasons," the International Organisation for Migration (IOM) said.
Police say there are more than 3000 so-called economic migrants from Iran, Morocco, Pakistan and Bangladesh in the area, in addition to more than 2500 Syrians, Iraqis and Afghans.
Trains between Greece and Macedonia have been blocked for days by Iranians occupying the railway tracks in protest at being blocked from moving towards western Europe. IOM said leaflets had been handed out advising the migrants to leave within three days.
Another fight broke out when some migrants blocked the passage of refugees entitled to pass. Riot police were rushed in after rival groups began throwing stones at each other.
"We are not economic migrants, we have money," said Omid, a 35-year-old Iranian who was part of the border protest. "I am Christian and in danger here. There are Muslims shouting 'jihad' and 'kill for Allah'. This morning they attacked us with stones and crowbars."
The authorities sent in two trains and buses, encouraging people with no hope of crossing the border to turn back to Athens and Thessaloniki - but only about 120 agreed to leave.
The UN refugee agency says 895,000 migrants have travelled to Europe by boat this year and more than 3500 have died in the water.
Since the northern summer, several European countries have tightened their borders to check the influx - a trend that has been accelerated by the November 13 attacks in Paris.
Two of the attackers slipped into Europe through Greece posing as refugees from Syria's civil war, according to French prosecutors.

