Sharbat Gula had been staying in a Peshawar hospital after being arrested last month for allegedly living illegally in Pakistan on fraudulent identity papers.
Pakistan deported Sharbat Gula on Wednesday, medical and security officials said.
Gula, popularly known as the "Afghan Girl," made the cover of National Geographic as a teenage girl after being photographed in a refugee camp, with her green eyes defiantly looking into the camera.
The magazine's June 1985 cover shot by Steve McCurry is one of the best remembered in its history.
Gula, now in her 40s, had been staying in a Peshawar hospital after being arrested on charges of living illegally in Pakistan on fraudulent identity papers. Police escorted her to the Torkham border crossing during the night, before handing her over to Afghan authorities.
The arrest took place on October 26, following a two-year investigation into her and her late husband. The court ordered her deportation at the end of her 15-day detention period.
A senior security official confirmed the deportation, saying, "We took Sharbat Gula from the hospital in a convoy and delivered her to the Afghan border authorities at Torkham."
The official added that during her transfer Gula had said prayers for Pakistan, its people and everyone who helped her and her family while they lived there.
She had been living in the city of Peshawar in northwestern Pakistan for years with her children and husband, who died five years ago.
Her four children were also expected to leave Pakistan to be reunited with their mother later on Wednesday.
Plans for Gula include a flight to Kabul, where Afghan President Ashraf Ghani intends to host a function in her honour. Public billboards went up welcoming her back home before she set foot in Afghanistan.
Pakistan is currently under pressure to send 2.5 million Afghan refugees back home because of security concerns. Afghanistan is trying to contain a violent Taliban insurgency and it is unclear whether the country can handle the return of so many people.
The Taliban movement seized control of Afghanistan in 1994 following the collapse of the government in Kabul and years of civil war that followed. They remained in power until the invasion of Afghanistan in 2001 by US-led forces following the September 11 attacks.