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 the 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.
Kohli said he was delighted at his first win as captain after coming close twice against Australia in Adelaide and against Sri Lanka in the first Test of the current series.
“We had played really good cricket in both those Tests as well and if we had done that for one more session there, two more wins would have been ours,” he said.
“It is a commendable effort by the team to regroup so soon after Galle and put up a show like this. Once we took those early wickets in the morning, we wanted to bowl attacking lines and didn’t want to lose time.
“There is one more Test to play and I am sure we will be as focused and positive as we were in this match.”
Opener Dimuth Karunaratne played a lone hand for the hosts with 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 Lankan captain Angelo Mathews said he was disappointed not to secure a win in Sangakkara’s final match.
“I was pretty disappointed with the way things went because we did not play our best cricket,” Mathews said. “I am even more disappointed that we did not win it for Sanga. We promised him we would play our best cricket, but we didn’t.
“The best time for batting was on the second and third days and we clearly did not capitalise on that. After they took the lead, they batted really well in the second innings and put us under a lot of pressure.
“The wicket was quite demanding, but we could have put on a better show on the last day. But having said that I must concede that India, especially Ashwin, bowled really well.”
Sri Lanka never recovered after they lost 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.
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.
Follow us on Twitter @NatSportUAE