President Nicolae Timofti on April 24 said the legislation violated human rights and would have cleared the way for what he called "torture."
He sent the measure back to parliament, where the legislation was approved on March 6.
The measure stated that convicted pedophiles would be chemically castrated, while courts would rule separately on the castration of those found guilty of rape.
Lawmakers who supported the bill argued that it was necessary after public outrage over several pedophile cases involving U.S. and West European nationals.
The legislation has been criticized by the Council of Europe and Amnesty International.