The execution of 42-year-old Esmail Jafarzadeh was shown in an amateur video shared on the state broadcaster's website.
He was hanged at dawn in the square of the small northwestern town of Parsabad, in Ardebil province.
The execution was held in public "to restore citizens' sense of security and relieve their troubled minds," Ardebil's prosecutor Naser Atabati told reporters.
Seven-year-old Atena Aslani went missing on June 19 after walking away from her street vendor father, sparking huge concern on social media.
Prosecutors said that Jafarzadeh, who was already the prime suspect, confessed to her rape and murder shortly after her body was found by police in the garage of his house, the judiciary-linked Mizan Online website reported.
President Hassan Rouhani described the case as "horrendous" and called for swift justice.
It took less than a week to convict Jafarzadeh after his trial began in late August. His death sentence was confirmed by the Supreme Court on September 11.
Iran does not provide official figures on executions, but human rights group Amnesty International says it was among the world's top five executioners in 2016, with most of its hangings related to drug trafficking.
Its Islamic penal code allows the families of murder victims to ask for "blood money" in lieu of execution.
Iran has also been horrified by the murder of an eight-month-old girl, who was in a car when it was stolen while her father opened the gates to their home in a Tehran suburb.
She was found dead in the car six days later, and two men have been charged with murder.
Iran's parliament passed a long-awaited amendment to its drug laws in August, raising the thresholds that can trigger capital punishment and potentially sparing the lives of many on death row. The law has yet to be approved by the Guardian Council.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)