Seeking to stay alive in the three-match series after going down by eight wickets in Friday's opening match, a spirited Bangladesh made regular breakthroughs to keep the visitors in check.
Nasir finished with a career best 3-26 while Mustafizur grabbed 3-38 as South Africa were bowled out to their lowest score against Bangladesh on a slow pitch at the Sher-e-Bangla National Stadium.
Left-arm pacer Mustafizur struck first in the fifth over when he forced a leading edge from opener Quinton de Kock as Sabbir Rahman took a simple catch at backward point.
South Africa began to feel pressure when Nasir bowled Rilee Rossouw off his first ball and Mahmudullah sent home David Miller forcing him to give a simple catch to Mashrafe Mortaza at short midwicket to leave the side wobbling at 74 for four.
Faf Du Plessis, who looked solid holding one end, holed out a catch at long on to Soumya Sarkar off Nasir. His departure after the top-score of 41 from 64 balls firmly swung the game in favour of the local bowlers.
Farhaan Behardien, who survived a leg-before decision against him after it was overturned by the TV umpire, resisted Bangladesh to score 36 before he became the last man to be dismissed.
The third and final match of the series will be held in Chittagong on July 15.
