The July 18 hanging of Hassan Afshar, 19, at Arak prison in Markazi Province was the first confirmed execution of a juvenile offender in the country this year, Amnesty International said.
CNN has sought comment from Iranian officials.
Afshar, who maintained the sexual acts were consensual, was convicted last year of "lavat-e be onf," or forced male-to-male anal intercourse.
Amnesty International said the execution was carried out even though judiciary officials had assured Afshar's family that his case would be reviewed next month.
"Iran has proved that its sickening enthusiasm for putting juveniles to death, in contravention of international law, knows no bounds," Magdalena Mughrabi, deputy Middle East and North Africa program director at Amnesty International, said in a statement.
The rights group said the young man had no access to a lawyer and that the judiciary rushed his prosecution, and convicted and sentenced him to death within two months of his arrest.
Mughrabi said Afshar was not informed of the death sentence for about seven months "because they did not want to cause him distress -- and yet astonishingly were still prepared to execute him."
Days after Afshar's hanging, Iranian authorities rescheduled the execution of Alireza Tajiki, another youth who was under 18 at the time of his alleged offense, according to Amnesty International. The date for the execution, which had been scheduled for Wednesday, was postponed following public pressure.
Mughrabi said 160 people remain on death row under "Iran's flawed juvenile justice system" over alleged crimes committed when they were under 18.
Rape is not among the offenses for which the death penalty can be imposed under international law, Amnesty statement said.
"The existence of laws in Iran that criminalize consensual male to male sexual intercourse with the death penalty means that if the intercourse in this case had been deemed consensual, the teenager who accused Hassan Afshar of rape would himself have been sentenced to death," the rights group said in the statement.
"The criminalization of same-sex sexual activity between consenting adults violates international human rights law."
International law, including the U.N. Convention on the Rights of the Child
, also prohibits the death penalty for crimes when the defendant was under 18, the rights group said.
Iran saw a surge last year in the number of people it put to death
At least 977 people were executed -- an increase of more than 200 from 2014. The majority were convicted of drug-related crimes, Amnesty International said.