The BBC will broadcast the next five Olympics - Summer and Winter - on its television, radio and online platforms.
It had already secured the rights for the 2016, 2018 and 2020 Games.
Now an "innovative" partnership with Discovery Communications ensures the 2022 Winter Games in Beijing and the Summer Games two years later will also be broadcast by the corporation.
The announcement ensures the BBC will continue to be the free-to-air home of the Olympics until 2024.
"The Olympic Games is one of the nation's most treasured sporting events," said Barbara Slater, director of BBC Sport.
"This is an extensive package of rights that ensures we can offer the best of the Games, across TV, radio, online and digital, maximising the reach and impact of the BBC.
"This ground-breaking partnership also shows how the BBC can collaborate and work with others to continue to bring the very best in sport to licence fee payers."
The next four Olympics take place in Rio de Janeiro (2016), Pyeongchang (2018), Tokyo (2020) and Beijing (2022).
The venue for the 2024 Games is yet to be decided.
The 2012 Games in London were watched on the BBC by more than 50 million people in the United Kingdom.
Seven million people accessed the BBC website every day, with 111 million requests for video and more than two million people downloading the app.
UK Sport recently predicted Britain could win as many as 79 medals in Rio, where the Games begin on 5 August.
Mo Farah will be attempting to win another Olympic double after taking 10,000m and 5,000m gold in London, while Jessica Ennis-Hill will defend her heptathlon crown.
|Watch London 2012's most-viewed videos|
|From Super Saturday to Bert's "beautiful boy"|
"The BBC prides itself on bringing the biggest sporting moments to the public," said Tony Hall, director general of the BBC.
"I'm delighted that through our new partnership with Discovery, the BBC will continue to carry the torch for great sporting coverage right through to the 2024 Games.
"While the BBC has had to take some tough financial decisions, this partnership underlines our commitment to making world class sport available to all."
As part of the agreement, Discovery will sub-license from the BBC exclusive pay-TV rights to the 2018 and 2020 Olympic Games.
David Zaslav, president and chief executive officer of Discovery Communications, said the deal was "a win for UK sports fans".
He added: "For 30 years, our two organisations have charted new frontiers with co-production partnerships in factual and natural history programming.
"Now we join together once again to bring the most compelling stories of human ambition, sacrifice and achievement to people across the UK."