The Proteas, who resumed after lunch at 78-2 here on Thursday, lost their last eight wickets for 91 runs in a dramatic afternoon session to be all out in just 50.2 overs at the stroke of tea.
Wily off-spinner Muralitharan finished with 4-41 to take his career tally to 639 wickets, second only to Australian record-holder Shane Warne's 685.
Fernando claimed 4-48 and Farveez Maharoof took 2-32 as the depleted Proteas lost the advantage of winning the toss and batting first on a good wicket at the Sinhalese sports club.
A.B. De Villiers was the only batsman willing to take on the Sri Lankan bowlers, smashing 65 off 72 balls with the help of eight boundaries.
De Villiers, who was on 47 when last man Makhaya Ntini walked out to bat, scored the remaining 18 runs for his team before holing out in the deep off Muralitharan.
The tourists missed three top players. Captain Graeme Smith and all-rounder Jacques Kallis stayed home because of injuries, while veteran Shaun Pollock opted out of the first Test due to the birth of his second child.
Pollock is expected to arrive here later on Thursday and will be available for the second Test of the short two-match series starting at the Sara stadium here on August 4.
Fernando rattled South Africa at the start by clean bowling openers Herschelle Gibbs and Andrew Hall in a hostile first spell to make it 45-2.
Hall, who opened the batting after South Africa omitted Boeta Dippenaar to play a fifth bowler in Dale Steyn, made 17 in 52 minutes with three boundaries when he played over a ball from Fernando.
Gibbs, returning to the team after being dropped from the previous series against New Zealand due to poor form, plodded for 72 minutes for his 19 when he was beaten by a fast Fernando delivery.
The South African batting was ripped apart when play resumed after lunch.
Maharoof struck with the second delivery when he forced Jacques Rudolph to edge a catch to wicket-keeper Prasanna Jayawardena.
Left-handed Rudolph, a late replacement for Smith, had made a fluent 29 before the break with five boundaries.
Ashwell Prince lasted just 15 deliveries in his first stint at the crease as South African captain, scoring one run when he poked at a Maharoof outswinger and gave the wicket-keeper another easy catch.
Muralitharan, who was proving unplayable even in easy batting conditions, drew Hashim Amla out of his crease and had him stumped for 19 to make South Africa 112-5.
It soon became 128-6 as Mark Boucher top-edged a sweep off Muralitharan and the ball ballooned to Sanath Jayasuriya at backward short-leg.
Muralitharan trapped Nicky Boje leg-before for five before Fernando removed Andre Nel and Dale Steyn off successive balls.