England's Reece Topley then struck twice in the second over to reduce South Africa to 7-2, the in-form left-arm quick removing dangerman Quinton de Kock and Rilee Rossouw.
South Africa were 86-4 in the 10th over, with Reeza Hendricks having made 57 off 33 balls, when Tristan Stubbs hauled them back into the game with a brilliant maiden T20 international fifty off just 19 balls, including six soaring sixes.
Even allowing for a good pitch and a relatively small ground, it was a superb display of ball-striking by the 21-year-old Stubbs.
But with South Africa needing 54 off 18 balls, paceman Chris Jordan conceded just three runs, with Andile Phehlukwayo defeated by several yorkers.
It was a decisive over, with South Africa also paying dearly for several fielding errors earlier in the match.
"CJ (Jordan) changed the momentum of the game, a brilliant over," said Buttler.
Stubbs launched Richard Gleeson to long-off as a brilliant innings of 72 off just 28 balls came to an end, with South Africa finishing on 193-8.
"They demolished us in the last 10 (overs) but we dropped four or five catches which cost us massively in the field," said South Africa T20I captain David Miller.
"It was a phenomenal knock by Stubbsy, an extremely disappointing result but there's another two (matches) to get it right."
The last thing South Africa needed to do was help Bairstow on his way.
But in his first short-form appearance for eight months, he was missed on 12, 57 and 72 as Heinrich Klaasen, Rossouw and Hendricks fumbled catches in the deep.
Bairstow had his first reprieve when Klaasen misjudged a chance off Tabraiz Shamsi, losing sight of the ball as it cleared him for six.
Left-arm wrist-spinner Shamsi conceded 19 runs in the 10th over, with both Dawid Malan (43) and Bairstow hitting him for six.
The wheels came off for South Africa during a 17th over where Phehlukwayo conceded 33 runs.
Bairstow hit the first two balls for six, watched two wides go by, was dropped off the third legal delivery before Moeen hit three more sixes to the delight of the crowd.
But no sooner had Moeen made fifty, he was caught behind off Ngidi to end a fourth-wicket stand of 106 in 37 balls.
Bairstow was 10 runs shy of three figures with two balls of the innings remaining when he skyed Ngidi into the legside only for Rossouw to hold the catch on this occasion.
He faced 53 balls, including three fours and eight sixes.
This series continues at Cardiff on Thursday.