The migrants were killed overnight on Friday as a group of about 200 people attempted to enter Iran from Lash Wa Juwayn district in the far western province of Farah, according to Afghan officials.
The Afghan government summoned the ambassador "to strongly protest against the killing and injuring of some unarmed Afghans who had entered Iranian soil for work", a statement from the foreign ministry in Kabul said.
"Firing at Afghan civilians who wanted to go to Iran for work is against religious, cultural and good neighbourly relations," it added.
Sediq Sediqqi, spokesman for the Afghan interior ministry, told AFP that 10 migrants were killed and 12 others were wounded in the shooting.
More From This Section
An Iranian embassy spokesman in Kabul was not immediately available to comment.
About 2.4 million Afghans -- refugees and illegal immigrants -- live in Iran, many of whom moved after the 1979 Soviet invasion of Afghanistan.
In December, Afghan demonstrators tried to storm the Iranian consulate in Herat in protest at the alleged killing of migrants by Iranian security forces.
Improved relations with Afghanistan's neighbours is seen as crucial to efforts to end the violence and establish a stable state as US-led troops withdraw next year.