England won the series 2-1 but missed out on a second clean sweep of their international summer, having defeated the West Indies 3-0 in July.
Resuming Day IV on 94/1 and requiring 125 more to win, the Sri Lankans needed barely two hours to complete the job clinically. The platform was built on Sunday when they skittled England for 156 in just 34 overs of the hosts' second innings and were given a victory target of 219.
Nissanka underpinned the chase with his second Test hundred, reaching three figures in 107 balls and finishing 127 not out as Sri Lanka got to 219 in 40.3 overs. The diminutive opener, who struck 13 fours and two sixes, spread his arms wide and soaked in the applause inside a half-full ground after passing 100, then kissed his bat and looked to the sky.
His other century was against the Windies in 2021, his first year in the Sri Lankan Test team.
The quality of his knock raised the question as to why he didn't start the first Test at Old Trafford last month before he was recalled for the second Test at Lord's. Fittingly, it was Nissanka who got the winning runs with a cut for four.
The visitors' previous Test wins in England came in 1998, which was a famous 10-wicket victory in a one-off Test at The Oval followed by the one at Trent Bridge in 2006 and at Headingley in 2014.
This latest one looked unlikely after they won the toss but couldn't capitalise on perfect bowling conditions on Day I, in which England ended on 221/3. It was all Sri Lanka after that, however, as England got sloppy and occasionally reckless.
The only wicket to fall on Monday was that of Kusal Mendis (39), who pulled a delivery from Gus Atkinson and saw Shoaib Bashir take a diving catch in the deep. Angelo Mathews was unbeaten on 32 alongside Nissanka at the end, with the pair putting on 111 in an unbroken stand for the third wicket.