Ashwin grabbed five for 42 as Sri Lanka, set an improbable victory target of 413 runs, were shot out for 134 in their second innings soon after lunch on the fifth day at the P. Sara Oval.
Leg-spinner Amit Mishra chipped in with three wickets as the hosts lost their last eight batsmen for 62 runs after resuming at 72-2, giving Virat Kohli his first win as captain in his fifth Test as leader.
A brief spell of heavy rain forced an early lunch with nine wickets down, but the weather cleared for India to finish the match in the second over after resumption.
The defeat denied retiring Sri Lankan great Kumar Sangakkara a fairytale farewell in his last international match. The left-hander was dismissed for 18 on Sunday.
India’s emphatic win set the stage for an intriguing finale to the series when the third and final Test starts at the Sinhalese sports club in the Sri Lankan capital on Friday.
Opener Dimuth Karunaratne made 46, but six batsmen failed to reach double figures as Sri Lanka were bowled out in 43.4 overs.
Ashwin finished with a match-haul of seven wickets to add to the 10 he took in the first Test in Galle where Sri Lanka fought back from the brink to win by 63 runs.
Sri Lanka lost captain Angelo Mathews off the first ball of the day, edging fast bowler Umesh Yadav to stand-in wicketkeeper Lokesh Rahul, who dived to his right to hold a low catch.
First Test hero Dinesh Chandimal began by hooking seamer Ishant Sharma for a six, before he was bowled round his legs by Mishra for 15 to reduce the hosts to 91-4.
It soon became 111-6 as India grabbed two more wickets in the space of five deliveries.
Ashwin had Lahiru Thirimanne snapped up at silly point by substitute fielder Cheteshwar Pujara, and in the next over Ishant Sharma forced Jehan Mubarak to edge a catch to second slip.
The procession back to the pavilion continued when Dhammika Prasad attempted to loft Ashwin out of the ground, but only managed to top-edge a catch to Mishra at mid-on.
Sri Lanka’s last recognised batsman Karunaratne was bowled by Ashwin before lunch and Mishra sealed the win by trapping both Tharindu Kaushal and Dushmantha Chameera leg-before on either side of the break.