Neighboring Pakistan has also ordered 1.7 million Afghans it said were living illegally on its territory to leave or face deportation.
A video on social media purportedly shows Iranians harassing and attacking Afghans.
Iranian officials say their country will deport all Afghan refugees who have no residence documents, a move many say will worsen Afghanistan's economic and social crisis.
Afghan deportees at the United Nations camp in Herat claim they have suffered beatings, torture and extortion at the hands of Iranian forces.
The Iranian regime has been tormenting and deporting Afghan refugees since the escalation of the Helmand river water dispute, refugees say.
Iranian soldiers opened fire on a group of Afghan migrants about 1km from the Iranian border, killing five, including a woman and child, and injuring one man.
Many Afghans living in Pakistan are facing continuing unemployment, problems with extending their visas and the disruption of their children's schooling.
Despite the dangers of the illegal journey to neighbouring countries, many young Afghans see no option but to leave their country in search of work.
Beatings, starvation and extortion are some of the ordeals experienced by Afghans deported by Iranian authorities.
Arbitrary arrests, torture and deportation of Afghan refugees in Iran are increasing, according to recent returnees and observers on the border.