Bangladesh lost seven wickets for 41 runs in less than an hour and a half as they were bowled out for 90 after being set 424 to win.
South Africa's victory was overshadowed by an injury to fast bowler Morne Morkel, who is expected to be out for six weeks.
Rabada started the destruction by taking the first three wickets of the morning. He finished with three for 33, while left-arm spinner Maharaj took four for 25.
Mahmudullah was bowled off an inside edge when he played a tentative defensive shot against the fast bowler and Liton Das offered no shot and was leg before wicket to a ball which slanted in to him.
More From This Section
Sabbir Rahman and Taskin Ahmed were both leg before to Maharaj before Shafiul Islam was run out when he and Mehedy Hasan attempted a third run against the strong fielding arm of Rabada after a relay throw from twelfthman Wayne Parnell, who chased a ball to long-off.
Bangladesh's rapid demise meant that South Africa were hardly hampered by the absence of Morkel, who suffered a side strain after taking the first two wickets on Sunday.
Team manager Mohammed Moosajee said Morkel required around six weeks rest, ruling him out of the second Test in Bloemfontein, starting on Friday.
South Africa dominated the match after Rahm's surprising decision to send them in to bat on an easy-paced pitch, with Dean Elgar (199), new cap Aiden Markram (97) and Hashim Amla (137) enabling them to score 496 for three declared in the first innings.