The Race's Chief Operating Officer Tom Touber revealed the agreement for the 2017-18 Race during a presentation at the Norwegian Church in Cardiff Bay.
The Volvo Ocean Race, which began life in Portsmouth as the Whitbread Round the World Race in 1973, moved its headquarters from England to its new home in Alicante, Spain in 2010. The last time the UK had a stopover was in 2005-06 in Portsmouth.
"It is fantastic to be able to announce that the Race will once again stop in UK waters, and a first visit to Cardiff is a very exciting move," said Race COO Touber.
"The competition to host the Volvo Ocean Race has never been more fierce, with over 80 ports involved in the process for the 12th and 13th editions. Cardiff made a particularly impressive bid to win one of the coveted European slots and with such outstanding facilities and great enthusiasm I'm convinced that we will have a stopover to remember."
Touber added: "The fact that we are making this announcement five years in advance is a very strong signal about the future of the Race and the commitment to it from the Volvo companies."
Also in attendance at the announcement were Edwina Hart, Minister for Business, Enterprise, Technology and Science in the Welsh Government, Cardiff Council Leader Cllr Heather Joyce and Cardiff Council Cabinet Member for Sports, Leisure and Culture Cllr Huw Thomas.
Welsh Government Business Minister, Edwina Hart, welcomed the news and said: “The Volvo Ocean Race is a truly global event and its arrival in Cardiff in a few years’ time will mark another historic milestone in Wales’ rise as an outstanding destination for world class events. The Welsh Government is fully committed to attracting more major international sporting event to Wales.
"Hosting a stopover in the Volvo Ocean Race will generate a substantial economic boost for the Cardiff and Wales economy. We look forward to welcoming thousands of new visitors to Wales, who will experience a vibrant capital city and a nation with a rich and diverse cultural heritage.
“We look forward to working with the Volvo Ocean Race and its partners, along with Cardiff Council and Cardiff Harbour Authority to deliver a world-class event.”
Cllr Joyce said: “This will bring hundreds of thousands of visitors to the city, and be hugely beneficial to the local economy.
“Being awarded the successful bid for one of the most important sailing events in the world once again demonstrates Cardiff’s ability to deliver major international sporting events on the world stage. It proves our reputation as an event city as well as providing an opportunity for many non sailors to try the sport through a co-ordinated programme of sailing activities before, during and following the event.”
While this will be the first British stopover in some time, the Volvo Ocean Race has retained strong links with its former home.
The One Design Volvo Ocean 65 racing yachts that will be used in the 2014-15 and 2017-18 editions are all being built by a consortium led by the Green Marine boatyard near Southampton, on England's south coast. The other three participating yards are Persico in Italy, Decision in Switzerland and Multiplast in France.
So far, eight ports have been unveiled on the route for the 12th edition of the Volvo Ocean Race in 2014-15. They are Alicante (Spain), Recife (Brazil), Abu Dhabi (United Arab Emirates), Auckland (New Zealand), Itajaí (Brazil), Newport, Rhode Island (United States), Lisbon (Portugal) and Gothenburg (Sweden), where the race will finish.
Race organisers will announce the remaining ports for the 2014-15 Race over the coming weeks.