England won the series 3-2.
Fernando, coming into the attack as first change, produced an inspired spell to bowl out England for a paltry 204 in 29.1 overs.
England were chasing a modest target after their bowlers had bundled out Sri Lanka for 211 in 48.1 overs.
Middle-order batsman Chamara Silva top-scored for the hosts with a fine 73 from 109 balls that included nine boundaries.
Sri Lanka were unable to defend an identical target on Wednesday, but England's batsman struggled on Saturday against Fernando, who mixed aggression with clever variations in pace.
Opener Alastair Cook [ Images ] (28) edged behind to leave England in trouble on 56 for three.
But England still looked on course on 72 for 3 until Fernando trapped captain Paul Collingwood [ Images ] (2) lbw in the 18th over, a dismissal that sparked a dramatic collapse with the final seven wickets falling for just 32 runs.
Lasith Malinga, who finished with 2-24, finished off the innings as Monty Panesar [ Images ] gave Sangakkara his fourth catch of the innings.
Earlier, Sri Lanka's batsmen showed more positive intent after three consecutive defeats, starting the innings with a 45-run opening partnership between Sanath Jayasuriya [ Images ] (26) and debutante Dilruwan Perera (30).
But England's bowlers, as they have done throughout the series, maintained their discipline and chipped away with regular wickets.
Jayasuriya cracked two sixes and one four in his 18-ball 26 before driving a slower delivery from James Anderson [ Images ] straight to Pietersen at mid-off.
All-rounder Dilruwan Perera, replacing the out-of-form Upul Tharanga, impressed with 30 from 41 balls before edging a catch behind off Sidebottom.
Three balls later skipper Mahela Jayawardene [ Images ] was dismissed for a second consecutive duck after spooning a catch to mid-on.
Kumar Sangakkara (26) helped add 34 runs with Silva before being bowled around his legs by part-time off spinner Owais Shah [ Images ].
Left-armer Ryan Sidebottom [ Images ], a frontrunner for the man of the series award, was England's best bowler, claiming 2-41 from his 10 overs.