The 28-year-old fast bowler took all his wickets in a lively opening spell as Sri Lanka dismissed Bangladesh for 164 after posting 234-6 to gain a 1-0 lead in the three-match series.
Sri Lanka earlier rode on impressive half-centuries from Chamara Silva (65) and Upul Tharanga (57) to reach a competitive total before man-of-the-match Fernando wrecked the tourists.
Bangladesh got off to a decent start when Shahriar Nafees (33) and Tamim Iqbal (11) put on 45 runs for the opening wicket.
Fernando provided the breakthrough when he dismissed Iqbal and Tushar Imran in the same over before accounting for skipper Mohammad Ashraful and Nafees to virtually ensure his team's emphatic victory.
"Hats off to Fernando. He has really come back strongly," said Sri Lanka captain Mahela Jayawardene.
"We made early mistakes and Bangladesh bowled well. Credit should go to Tharanga and Silva as it was not easy to bat. We capitalised in the last 10 overs as well."
Sri Lanka were in trouble at 67-3 after being put in to bat, but left-handed opener Tharanga and Silva propped up the innings with an 83-run stand for the fourth wicket.
Bangladesh, blanked in the preceding three-Test series, rocked the hosts in the early overs when left-arm seamer Syed Rasel took two wickets and paceman Mashrafe Mortaza one in their opening spells.
Sanath Jaysuriya (21), Kumar Sangakkara (16) and Jayawardene (two) fell cheaply before Tharanga and Silva came to their team's rescue.
Tharanga struck seven fours in his ninth half-century, while Silva hit one six and eight fours before being trapped leg-before by Bangladeshi left-arm spinner Abdur Razzaq.
Bangladesh had chances to restrict Sri Lanka to a modest total but dropped three catches early in the match.
"Our bowlers did well, but we dropped too many catches. We also didn't bat well after a good start. We'll try to do better in the next match," said Bangladesh skipper Mohammad Ashraful.
Sri Lanka suffered a blow when veteran opener Jayasuriya was bowled by Rasel, just two balls after he had smashed the same bowler for a six over midwicket.
Wicket-keeper Sangakkara, who hammered back-to-back Test double-centuries, was caught behind off Mortaza, while the Sri Lankan captain played a loose drive and was caught by Shakib-Al Hasan in the covers.
Sri Lanka plundered 70 runs in the last 10 overs, thanks to Tillakaratne Dilshan (24) and Jehan Mubarak (22 not out).
Dilshan was caught by Ashraful in the covers, the bat slipping out of his hands while he tried to play a shot off Mortaza.