The migrants have been stranded at the border for three weeks after authorities in Macedonia restricted access to citizens from countries normally granted political asylum, such as Syria and Iraq.
Police said the migrants will be moved to Athens in buses.
Greek authorities say at least 11 people have died and 13 are missing after a boat carrying about 50 migrants sank in the eastern Aegean Sea.
The coast guard said 26 people have been rescued alive. It said the accident occurred early Wednesday when a wooden boat carrying the migrants from Turkey sank near the islet of Farmakonissi.
The dead were five children, four men and two women. Their nationalities were not immediately known.
Greece is the main entry point for refugees and economic migrants seeking a better life in the European Union.
More about: