Sharbat Gula was found guilty of living in Pakistan with fake identity documents and sentenced to 15 days in prison.
She will probably be deported on Monday, her lawyer told BBC Urdu.
Gula, whose haunting green eyes made her famous, fled Soviet-occupied Afghanistan as a child.
"With utmost delight, I announce that Sharbat Gula is now free from the legal troubles she endured over the past couple of weeks," Dr Omar Zakhilwal, Afghanistan's ambassador to Pakistan, posted to his Facebook page.
"She soon will also be free from an uncertain life of a refugee as she will be on her way back to her own country as soon as next Monday where she still is a beloved image and a national icon."
Gula was arrested in Peshawar, near the Afghan border, on 23 October after a two-year investigation. Her sentence was backdated to the date of her arrest.
She will be met by Afghanistan President Ashraf Ghani when she arrives in the country.
Her lawyer told BBC Urdu that she pleaded guilty to all charges against her in court. She has been fined 110,000 rupees ($1,100) in addition to the prison sentence.
Legal experts say she received a lenient sentence and could have faced years in prison.
Gula has been in hospital since Wednesday, receiving treatment for Hepatitis C.
Pakistan has started cracking down on refugees living in the country amid rapidly deteriorating relations with India and Afghanistan.
Three Pakistani officials have been charged for allegedly issuing fraudulent identity cards to Sharbat Gula and two others believed to be her sons, Pakistan's Dawn newspaper reports.
The celebrated "Afghan Girl" picture was taken by photographer Steve McCurry in 1984 in a refugee camp in north-west Pakistan, during the Soviet occupation of Afghanistan. It led to one of the most recognisable magazine covers ever printed.
He tracked her down 17 years later, living in the Tora Bora region of Afghanistan. Gula later moved back to Pakistan and he kept in touch.
Mr McCurry recently said he had hired a lawyer for her following her arrest.
The Afghan woman who famously appeared on the cover of National Geographic in 1985 will be deported from Pakistan after serving a short prison sentence.