The new agreement, shared with ITV, covers TV, radio and online coverage.
It continues the free to air broadcasting of World Cup tournaments to UK television viewers.
The 2018 finals will be the 14th consecutive World Cup that the BBC and ITV broadcast together, dating back to the 1966 competition in England.
More than three quarters of the UK population tuned in to the 2010 tournament in South Africa.
BBC director of sport Barbara Slater said: "We are delighted to have secured the rights to one of the biggest sporting events in the world.
"It is fantastic news that the pinnacle event in world football will continue to be available free of charge for everyone in the UK.
"As we prepare for kick-off in Brazil we hope viewers at home will enjoy watching it as much as we will look forward to broadcasting it."
Niall Sloane, ITV director of sport said: "The excitement building on the eve of this summer's tournament in Brazil demonstrates how the World Cup offers a shared, collective experience for people across the UK.
"So we're thrilled to be able to look forward to bringing the next two World Cups free to air to viewers in 2018 and 2022."