At present, those under 18 can be sentenced to a maximum of three years in a reform facility.
The move to change the law gathered momentum after the youngest convict in the notorious 2012 Delhi gang rape was recently released from detention.
The parents of the victim were among those campaigning to change the law.
On Tuesday, the Juvenile Justice Bill was passed by the Rajya Sabha - the upper house of the parliament.
The bill was approved by the Lok Sabha - the lower house - in May.
It will now have to be signed by the president to become law - which, correspondents say, is a mere formality.
The new law will not apply to the youngest 2012 rapist, but it will be used in future cases involving juvenile offenders above 16 years.
Authorities say the number of juvenile crimes have been increasing - last year, 38,565 cases were registered, including many cases of rapes, murders and acid attacks.
The supporters of the new law say tougher punishment will act as a deterrent.
However, critics say that India is a signatory to the UN Convention on the Rights of the Child which mandates that all children under the age of 18 be treated equally, and say the new law will violate the convention.
Jyoti Singh, a 23-year-old physiotherapy student, died after being brutally raped by five men and one minor on a moving bus in 2012.
The attack sparked a huge public outcry in India and forced the authorities to introduce tough new laws to deal with crimes against women.
Her mother Asha Devi said she was "satisfied" at the bill's passing. "But I am sad that my daughter did not get justice," she added.
Four adult convicts in the case are appealing against death sentences. A fifth died in prison.
But the youngest of her attackers, who was 17 at the time of the crime, was sentenced to three years and released recently.
During his trial in a juvenile court, there were calls to try him as an adult and protests were held over the weekend against his release.
Since his release, the rapist has been housed with a charity because of fears over his safety.
On Monday, India's Supreme Court dismissed an appeal to stop his release, saying it "shared" the concern of most citizens but its hands were "tied" by the law.

Shillington, who made 90 appearances in the 50-over format, will continue to play Twenty20 internationals.
The 36-year-old scored 1,276 runs, including six half-centuries, in an ODI career which began in August 1997.
Ireland, already out of contention for a World Cup place, lost by 36 runs in a rain-affected contest in Colombo.
The Irish were bowled out for 166 with a ball of their 50 overs to spare, with Malahide keeper Mary Waldron top-scoring with an unbeaten 33.
Isobel Joyce (30), Cecelia Joyce (29) and Gaby Lewis (21) were unable to push on against a South Africa side who had already made sure of qualification, as Lizelle Lee, Sune Luus and Dane van Niekerk all took two wickets.
Kim Garth trapped Lee lbw early on in South Africa's reply, but Laura Wolvaardt (32 not out) and Mignon du Preez (29 not out) took them to 82-1 when rain and thunder at the Colombo Cricket Club curtailed the game with the batting side well ahead on the Duckworth-Lewis-Stern system.
Shillington, whose ODI career began as a 16-year-old, said: "It feels like it's the right time to move away from the longer format due to the increased programme and upcoming tour commitments.
"But I am excited to stay involved in the T20 format with a qualifier and World T20 coming around in 2018."
In 2013, she became the first Irish woman to score a Twenty20 hundred in a 117-run victory over Japan, hammering an unbeaten 114 from 72 balls in Dublin, although that match was not classed as a "full" T20 international as Japan do not have T20 international status.
This content will not work on your device, please check Javascript and cookies are enabled or update your browser
The Indian parliament has passed a bill which allows juveniles between 16 and 18 years of age to be tried as adults for serious crimes like rape or murder.
[NEXT_CONCEPT]
Clare Shillington announced her retirement from one-day internationals after Ireland lost to South Africa in their final World Cup Qualifier game.