Reigning world champions South Africa will visit Murrayfield as part of Scotland's four autumn international Tests in November, Scottish Rugby announced on Tuesday.
The back-to-back winners of the Webb Ellis Cup will face Scotland on November 10.
South Africa last met Scotland during the 2023 World Cup, winning the group-stage encounter 18-3.
Scotland begin their autumn international series against Fiji on November 2, before playing the Springboks.
They will then take on Portugal six days later and end the series with a clash against Australia on November 24.
Scotland finished fourth in the Six Nations championship, losing three matches but earning narrow victories against rivals England and Wales.