Mushfiqur hit 110 not out as Bangladesh made 278 for seven, their highest total against South Africa, after winning the toss and batting on an easy-paced pitch.
The previous highest score by a Bangladesh batsman in any form of international cricket against South Africa was 90 by Soumya Sarkar in a one-day international in Chittagong in 2015, while Bangladesh's previous highest total against the hosts was 251 for eight when they won a World Cup match in Guyana in 2007.
Mushfiqur made his runs off 116 balls with 11 fours and two sixes. He shared successive partnerships of 59 with Shakib Al Hasan (29), 69 with Mahmudullah (26) and 42 with Sabbir Rahman (19) for the third, fourth and fifth wickets.
Kagiso Rabada spearheaded South Africa's bowling attack, taking three for 43. Dwaine Pretorius took two for 48 but debutant fast bowler Dane Paterson conceded 69 runs in nine overs.