The bill was first introduced in 2008 in response to a high-profile case in which a 58-year-old man raped and assaulted an eight-year-old girl. The attack caused widespread revulsion and left the victim with lasting physical injuries.
Government policies, including the installation of more security personnel near school grounds as well as multiple surveillance cameras, have not prevented a series of similar cases.
A 33-year-old man who raped and murdered a 13-year-old girl in February was sentenced to death last week. In another case, a 45-year-old man allegedly kidnapped a girl from her elementary school and raped her in the basement of a church.
The legislation, which requires the South Korea's president signature to become law, would allow judges to sentence adult sex offenders who attack minors under 16 and have been diagnosed as sexual deviants to chemical castration.
The procedure involves the administration of testosterone-suppressing hormones intended to curb sexual drive. Offenders would also receive behavioral and psychological therapies.
The vote makes South Korea the first country in Asia to pass legislation to legalise chemical castration, according to Yoo Jin-hee, an aide to Park Young-sun, a member of the parliament's legislation and judiciary committee.
MPs passed the bill by a vote of 137-13. More than 140 members either did not make a choice or did not vote. The legislation would take effect a year after president Lee Myung-bak signs it into law. The US state of Louisiana passed a chemical castration law in 2008.