The matches, scheduled for July 31 and August 7, were due to take place in Johannesburg but have been moved due to the Gauteng region being badly hit by coronvirus.
The decision to remain in Cape Town was made following extensive consultation with medical experts on the risks associated with the Delta variant of Covid-19.
Both South Africa and the Lions have been hit by Covid cases while based in Gauteng, causing the cancellation of matches.
It means all three Tests will be played at the Cape Town Stadium. The first Test, which will take place this Saturday, was always scheduled to be played there.
The decision is not a surprise and Warren Gatland, the Lions head coach, anticipated the switch a couple of weeks ago.
Jurie Roux, the chief executive of SA Rugby, said: “The data pointed in only one direction. The series has already been significantly disrupted by Covid-19 and a return to Gauteng at this time would only increase the risks.
“We now have two teams in bio-secure environments without any positive cases or anyone in isolation. To now return to the Highveld would expose the series to renewed risk.
“Everyone wants to see the two squads, at their strongest, play out an unforgettable Series over the next three weekends and this decision gives us the best opportunity to see that happen.”
Ben Calveley, managing director for the British and Irish Lions, said: “We are fully supportive of this decision which we believe to be in the best interest of the Test Series."
Roux thanked Gauteng and the city of Cape Town for their flexibility and understanding to accommodate the late change of plan.
“We have had great support from local government, and I’d like to thank both Gauteng and the City of Cape Town for their open-minded engagement in what has been a very challenging time,” said Roux.
“Extraordinary times have called for extraordinary measures and we have had support from all our commercial partners despite the challenges.”