The man, identified as Amir-Hossein Rouhafza, was hanged from a crane in the early hours of the day in the town of Gharchak.
Rouhafza, 28, had been convicted of killing a judge called Javad Jafarpour in Gharchak.
The state-run news agency ISNA said that local officials were present at the site of the execution.