There will be an "educational opportunity" Bill so all young people can stay in education or training to the age of 18, Gordon Brown told MPs.
Getting more to stay on is seen as key to improving skills
The measure - one of several announced in the Commons - is an effort to drive up the "staying on" rate.
This in turn is seen as essential in improving people's skills in the face of growing global competition.
The Education and Skills Bill will apply directly to England and Wales, with talks about the rest of the UK.
Setting out his legislative plans, Mr Brown said: "We must deliver new and better opportunities."
He cited education first.
"A new educational opportunity Bill will mean not just some but all young people will be able to stay in education or training to the age of 18."
Later the prime minister promised there would be a "high status" academic and vocational route for teenagers to follow.
Conservative leader David Cameron said the government had promised to make education a priority 10 years ago.
But the number of young people not in education, training or employment after 16 had actually gone up and was more than a million.
Liberal Democrat leader Ming Campbell wanted to know how the curriculum would be made relevant for those who had expected to leave school when they were 16.
Officials said later the education Bill would have the title Education and Skills and would apply to England and Wales.
There would be talks with the devolved administrations in Scotland and Northern Ireland about their "responsibilities" in 16 to 18 education and training.
Mr Brown also announced a Children in Care Bill to do more to protect vulnerable children, and a Child Maintenance Bill to prevent children from falling into poverty when parents split up.
Two thirds of young people who are in education aged 16 to 18 in England are in colleges.
The chief executive of the Association of Colleges, John Brennan, said: "Raising the age of leaving education and training is an essential step towards equipping all young people with the skills and knowledge needed for personal success, and towards overcoming that legacy of underperformance which continues to hold back the British economy.
"Individuals, employers and the nation will all benefit from the revolution in our national attitudes to learning it will engender."
Further education colleges and schools would have to create attractive learning programmes, but everyone had to play their part - resources from government, commitment from employers and motivation from families, he said.