He was brilliantly supported by debutant Mendis, an unorthodox spinner with plenty of variation, who took eight wickets in the match to also play a crucial role in his team's victory with a day to spare.
It was Sri Lanka's biggest win over India in 27 Tests, the previous being by an innings and 77 runs at the same venue in 2001.
The Indian batsmen, always considered better against spin than pace, looked clueless against the Sri Lankan spin duo, who kept striking at regular intervals even on an easy-paced track.
The tourists lost 14 wickets against spin in the day, including four in the first innings.
None of the Indian batsmen could read the spin duo as the tourists' second innings lasted just 45 overs, with man-of-the-match Muralitharan grabbing 6-26 and Mendis 4-60 during their almost unplayable spells.
India were earlier bowled out for 223 in their first innings in reply to the hosts' massive 600-6 declared.
Indian opener Virender Sehwag (13), star batsman Sachin Tendulkar (12) and Rahul Dravid (10) were initially given not out by umpires Mark Benson of England and Billy Doctrove of the West Indies.But Sri Lanka captain Mahela Jayawardene requested the officials to review the decisions under a new experimental rule and they changed their decisions after consulting TV umpire Rudi Koertzen of South Africa.
Sehwag was trapped leg-before by Muralitharan, while Tendulkar was caught by a diving Tillakaratne Dilshan at leg-slip off the same bowler after TV replays showed the ball hit pad and bat.
Dravid was caught bat-pad by close-in fielder Malinda Warnapura off Mendis.
India failed to cope with spin for a second successive time in the match, with opener Gautam Gambhir top-scoring with 43.
Venkatsai Laxman, promoted in the batting order following his first-innings 56, contributed 21 this time before being trapped leg-before by Mendis, while Gambhir was stumped off Muralitharan after being beaten in the flight.
Muralitharan earlier took 5-84 in the first innings and Mendis 4-72.