Mohammad Ali Najafi, 67, was sentenced to death last month after being convicted of shooting dead his second wife Mitra Ostad at their home in the Iranian capital on May 28.
Ostad's family had appealed for the Islamic law of retribution to be applied -- an "eye for an eye" form of punishment which would have seen the death penalty served.
But her brother Masood Ostad said the family had decided to grant him a reprieve, according to a post on his private Instagram account cited by various media outlets.
State news agency IRNA said a lawyer for the family, Mahmoud Hajiloui, had confirmed the reprieve.
In his Instagram post, the brother cited a verse from the Koran that says: "Allah loves the doers of good".
"My father, my mother and our Mahyar (his sister's son) forgive Mr Mohammad Ali Najafi" after mediation that involved others, he wrote.
"We are happy that we made no deal for the blood of that honourable (person)," he added, referring to retribution for his sister's murder.
"We hope Mr Mohammad Ali Najafi in his remaining years... engages in cleansing himself."
Najafi remains behind bars after also receiving a two-year jail sentence for illegal possession of a firearm, but it was not immediately known if he still has to serve time for murder.
The former mayor's trial received detailed coverage in state media where scandals related to politicians rarely appear on television.
A mathematician, professor and veteran politician, Najafi had previously served as President Hassan Rouhani's economic adviser and education minister.
He was elected Tehran mayor in August 2017, but resigned the following April after facing criticism from conservatives for attending a dance performed by schoolgirls.
Najafi married Ostad without divorcing his first wife, unusual in Iran where polygamy is legal but socially frowned upon.
Some of Iran's ultra-conservatives said the case showed the "moral bankruptcy" of reformists, while reformists accused the conservative-dominated state television of bias in its coverage and highlighting the case for political ends.