Shakib Al Hasan led a strong Bangladesh batting effort, hitting 77 off 64 balls as Bangladesh made 314 for seven after being sent in.
Rassie van der Dussen hit 86 and David Miller made a hard-hit 79 but South Africa were bowled out for 276.
Bangladesh had never beaten the Proteas in SA
Bangladesh had previously lost every match they played against the Proteas in South Africa – six Tests, nine one-day internationals and four Twenty20 internationals.
Bangladesh 314/7 in 50 overs (Tamim Iqbal 41, Litton Das 50, Shakib Al Hasan 77, Yasir Ali 50; M. Jansen 2-57, K. Maharaj 2-56).
Sunday, 20 March, Johannesburg – 10:00
Wednesday, 23 March, Centurion – 13:00