Sri Lanka struggled to 181 all out, with Kusal Mendis the only batsman to shine for the tourists, making 62.
Left-arm seamer Parnell took three for 48 while leg-spinner Tahir showed superb control in a strong westerly wind, taking three for 26.
"Today was a little more special for me," said man of the match Tahir. "It is my wedding anniversary and this is absolutely for my wife. She asked me to take five wickets and win man of the match. I didn't take five wickets but I am very happy with my performance."
Parnell plunged Sri Lanka into early trouble by taking wickets with the first balls of the second and fourth overs after South African captain AB de Villiers won the toss and decided to bowl.
More From This Section
Although Dinesh Chandimal and Mendis put on 72 for the third wicket, Tahir ripped the heart out of the middle order, taking three wickets in four overs.
"It was a great bowling performance which put them on the back foot," said De Villiers. "The new ball bowlers bowled with a lot of intensity up front, which is exactly what we want from them, and Immy (Tahir) was a great impact bowler in the middle overs again."
"Although Sri Lanka's total was well below par, it was still a tricky target on a pitch which was slow, two-paced and kept really low.
"It was more like Sri Lankan conditions and their spinners could have caused some problems. But Quinton and Hash got us off to a great start, which made it easy for Faf and me," said De Villiers, who made 30 not out.
Sri Lankan captain Upul Tharanga was disappointed. "Although Dinesh and Mendis had a partnership, we never picked up from losing early wickets," he said. "It was a slow pitch but our spinners did not control the ball much. We need to improve in batting and bowling."
Mendis, who had made only 87 runs in seven innings since hitting 58 in the second innings of the first Test at the same venue last month, hit ten boundaries in his 94-ball innings. His first seven scoring strokes were fours, mainly struck fluently on the off side.