The 34-year-old off-spinner, in what could be his final Test in England, finished with figures of eight for 70, including a spell of eight for 26 in 105 balls.
He had been on course to become only the third bowler in Test history to take all 10 wickets in an innings, after England off-spinner Jim Laker (10 for 53 against Australia at Old Trafford in 1956) and India leg-spinner Anil Kumble (10 for 74 against Pakistan at Delhi in 1999).
But teenager Chamara Kapugedera, who had earlier scored a Test-best 50, ended Murali's hopes of joining his two fellow spin greats by running out Matthew Hoggard for four.
England, who needed 325 to win, finished on 190 as Murali, whose unique action has seen him no-balled four times for throwing during a controversial career, proved too much on a wearing pitch and ended with a match haul of 11 for 132 - the 16th time he had taken 10 or more wickets in a Test.
Liam Plunkett was 22 not out.
Murali said his performance was "one of the best" in his career.
"It is not easy against England, the wicket helped. The batsmen coming in were very hard," he added.
Murali claimed he was not upset at Hoggard being run out, which denied the spin wizard the chance to claim a 10-wicket second innings haul.
"I was happy if we get England all out. We wanted to win the match and level the series," he said.
"I was celebrating all the wickets we can take. I had already taken seven and I was happy at the time."
England captain Andrew Flintoff insisted that despite the defeat, his team were improving with each Test.
"We've got to hold our hands up," he said afterwards. "We were in positions where we were very much involved in the match.
"I feel we're getting better the more cricket we play. We're an inexperienced side."
A left ankle problem, a recurrence of an old injury, had prevented all-rounder Flintoff from bowling at full speed during Sri Lanka's second innings.
"I went for a scan yesterday which showed some bone fragments around the ankle. It is in the hands of the specialists," he said.
"The next 48 hours and towards the end of this week, we'll probably know more about it," he said.
The most runs England had scored to win a Test in the fourth innings was the 332 for seven they achieved against Australia at Melbourne back in 1928/29.
But they began their daunting task with a solid opening stand of 84 between left-handers Marcus Trescothick and Andrew Strauss.
Murali, who came on in the 10th over, initiated the collapse when he had Trescothick playing on to a ball that kept low for 31.
Alastair Cook, dropped on one, was lbw for five to Murali's 'doosra' - the ball that turns into the left-hander rather than a normal off-spinner which spins away.
Strauss had completed an 87-ball fifty with six fours, his first half-century of the series, before he was caught for 55 at slip by Sri Lanka captain Mahela Jayawardene off Murali to leave England 111 for three.
Kevin Pietersen, who made 142 in England's six-wicket second Test win at Edgbaston, then fell for six when he was caught by Tillakaratane Dilshan at short leg off the glove.
And four balls later Flintoff fell to former Lancashire team-mate Murali, also caught by Dilshan, off bat and pad, for nought.
Dilshan then took a superb catch off Paul Collingwood's bottom-edge and boot as the Durham all-rounder fell for nine, although it needed the third umpire to confirm his exit.
England were 125 for six at tea, 200 runs shy of victory.
But wicket-keeper Geraint Jones fell soon afterwards, bowled for six by Murali who, at that stage, had taken seven wickets for 16 runs.
Then 19-year-old Kapugedera ran out Hoggard with a brilliantly acrobatic direct hit as England slumped to 136 for eight before Jon Lewis was plumb lbw to Murali for seven.
Last man Monty Panesar swept Murali for some well-struck boundaries, including a superb six, but was merely delaying the inevitable.
But the left-arm spinner could be content with a Test-best score of 26 to go with the Test-best haul of five for 78 (his first five-wicket Test innings return) he completed earlier Monday as Sri Lanka were bowled out for 322 in their second innings.
Panesar was last man out, lbw to left-arm spinner Sanath Jayasuriya, after striking one six and three fours as England's innings ended inside 69 overs.
They lost 10 wickets for 106 runs in 250 balls.
In the morning Sri Lanka left-arm quick Chaminda Vaas, a thorn in England's side with the bat this series, finished on 34 not out with seven fours.
In Sri Lanka's first innings he had made an unbeaten 38 and put on a valuable 62 for the last wicket with Muralitharan.
Sri Lanka 2nd innings
7-238, 8-287, 9-320
England 2nd Innings
6-125, 7-132, 8-136, 9-153, 10-190
Man-of-the-match: Muttiah Muralitharan