The party said the “age-appropriate” lessons would be part of a “curriculum for life”, which would also include money management and citizenship.
Labour backed the idea but said the Lib Dems had failed to deliver it so far.
The Conservatives said teachers knew best how to deliver such education, not bureaucrats or politicians.
Under the Lib Dem plans, which will be included in the party’s manifesto for next year’s general election, schools would be required to offer lessons on sex and relationships in Key Stage 2 – which includes children aged seven to 11.
The party also plans to make all state-run secondary schools offer the lessons, which form part of the wider area known as personal, social and health education (PSHE).
At present, state secondary schools run by local authorities must offer sex and relationships education, but free schools and academies are not required to do so.
Lib Dem schools minister David Laws said: “It is vitally important that children learn all the life skills they need when they are at school, and Liberal Democrats believe that this should include learning financial literacy, citizenship and age-appropriate sex and relationship education.
“We have long made the case, both inside and outside government, for updated sex and relationship education to be taught in all schools, including academies and free schools, but it is not something the Conservatives are open to.
“We believe that by educating children about sex and relationships in an appropriate way, we can help them to make informed choices in their personal lives.”
The Labour Party said it had been calling for the move for years and that the Lib Dems had voted against a similar proposal when the opposition tabled it in the House of Lords earlier this year.
“Violence in young relationships is a huge issue as is preventing violence in future relationships,” said shadow Home Office minister Seema Malhotra.
“Only through ideas like compulsory sex and relationship education can we tackle the root causes of domestic abuse and give young people the tools and support they need to make informed decisions about their lives.
“It is welcome that the Lib Dems have finally caught onto this agenda but they have had four years in government to take some action and have failed.”
The Department for Education said sex and relationships education was an “important part of preparing young people for life in modern Britain”.
“Sex and relationship education is compulsory in all maintained secondary schools and many primary schools also teach it in an age appropriate manner,” a spokeswoman said.
“We also expect academies and free schools to deliver relationship education as part of their provision of a broad and balanced curriculum.
“We have also made financial literacy compulsory for the first time ever for 11-to-16 year olds, which will cover the importance of budgeting, sound money management and how different financial services work.”