Scotland will look to end an 11-year winless run against South Africa when they host the world champions in November 2021 as part of their Autumn Internationals season.
Scotland will also host Australia and a third side, which will be announced at a later date, with fixtures set to take place on the weekends of Nov. 6, 13 and 20.
Scotland have lost their last six meetings with South Africa since their 21-17 victory a decade ago.
"The Autumn Internationals in 2021 will be another opportunity for our players to represent their country, hopefully with our fans in attendance, and provides the team with a different challenge and exciting challenge as a result," Scotland head coach Gregor Townsend said in a statement.
Townsend's side will also be looking for a hat-trick of victories against Australia, having won their last two encounters in 2017.