India were in a comfortable position, needing just five off 18 deliveries with two wickets in hand and a set-batter in the form of Shivam Dube in the middle.
But Asalanka, despite being hit for a four on the third delivery of the over, hit back with back-to-back wickets and snatched the victory from the touring side.
With no super over on offer, the two teams settled for a tie, which marked only the second instance in the history of ODI cricket.
Chasing a meager total of 231, India got off to a flying start as returning veteran opener Rohit Sharma, alongside Shubman Gill put together 75 runs before the latter perished in the 13th over after a scratchy 16 off 35 deliveries.
Rohit fell in the 15th over when Dunith Wellalage trapped him in front. He remained the top-scorer for India with a 47-ball 58, laced up with 10 boundaries including three sixes.
India then another wicket in quick succession when Washington Sundar perished cheaply for five, leaving them reeling on 87/3 in 15.4 overs.
Virat Kohli and Shreyas Iyer then joined forces amid the fourth-wicket partnership and added 43 runs before both fell in successive overs as India lost half of their batters for 132 in the 25th over.
Kohli made 24 off 32 deliveries while Iyer made a run-a-ball 23.
India kept losing wickets at regular intervals and it all came down to Shivam Dube, who scored a fighting 25 off 24 balls before his dismissal to Asalanka in the 48th over.
Skipper Charith Asalanka and Wanindu Hasaranga bagged three wickets each for Sri Lanka, followed by Dunith Wellalage with two.
Opting to bat first, Sri Lanka registered 230/8 in the allotted 50 overs, courtesy of important half-centuries by Pathum Nissanka and Wellalage.
Nissanka ticked the scoreboard single-handedly with a gutsy half-century before finally perishing in the 27th over.
With his departure, Sri Lanka had lost half of their side with just 101 runs on the board.
Wellalage then took charge of Sri Lanka’s batting expedition and scored a defiant half-century to take his side to a commendable total.
He remained the top-scorer for Sri Lanka with a 65-ball 67 that featured seven fours and two sixes.
Axar Patel and Arshdeep Singh bagged two wickets each for India while Mohammed Siraj, Shivam Dube, Kuldeep Yadav and Washington Sundar made one scalp each.
The second ODI of the three-match series between India and Sri Lanka will take place on Sunday at the same venue.