The "Child Protection Act" - which came into effect in the areas held by the Liberation Tigers of Tamil Eelam on October 15 - also makes education compulsory for children until aged 16 and bans all forms of child labour, the TamilNet website reported on Wednesday.
The separatist movement control a large area in northeast of Sri Lanka where they have their own laws, and operate their own courts, police and administrative system.
International rights groups and the United Nations Children's Fund have accused the Tamil Tigers of using children in their fight against Sri Lankan government forces, despite promises to halt the practice.
The separatists have admitted using child soldiers but claim that the children joined by lying about their age.
The new law prohibits the "enlisting of children under 17 years in armed forces, [and] makes participation of under 18-year-olds in armed combat illegal," TamilNet said.
The report did not say what the penalty would be for recruiting children but employment of children under 16 years will be punishable by a two-year jail sentence.
Government and Tamil Tiger
officials are in Geneva for talks
In July, UNICEF said that 1,387 underage children were fighting for the separatists, but the Tigers challenged the figures, saying at least 800 names on the list were above 18 years old.
The Sri Lankan government has said that it will raise the issue of child combatants during peace talks in Geneva this weekend.
Nearly 3,000 people have been killed since the two sides last met for face-to-face talks eight months ago.
Human Rights Watch has urged the government and the Tamil tigers to use the talks to end the "rampant and widespread" abuse of civilians in Sri Lanka.
The US-based rights group sent letters to Sri Lankan President Mahinda Rajapakse and S.P. Tamilselvan, the leader of the Tigers' political wing, calling for concrete steps, including demilitarised zones.
Brad Adams, Asia director at Human Rights Watch, said: "The Geneva talks present an opportunity for both sides to put such commitments on the table".
A meeting in Oslo last June collapsed after the Tigers walked out saying the Sri Lankan delegation was too junior. This time, the government has sent four ministers to Geneva.
The Liberation Tigers of Tamil Eelam have fought the government since 1983 in an attempt to create a separate homeland for ethnic minority Tamils, citing decades of discrimination by the majority Sinhalese.
More than 65,000 people were killed in the fighting before Norway brokered a ceasefire in 2002.