Anderson claimed 10 victims in the match as Sri Lanka crumbled to 119 all out in their second innings on the third day after being asked to follow-on.
Anderson had Dimuth Karunaratne (seven) and Kaushal Silva (14) caught by wicketkeeper Jonny Bairstow in another probing spell in the morning before rain forced the players off for an early lunch with Sri Lanka on 77 for two.
Stuart Broad forced Sri Lanka captain Angelo Mathews to nick another catch through to Bairstow and Mendis, on 53, was bowled by Anderson off the inside edge.
Dasun Shanaka's unhappy stay at the crease ended when he edged Anderson through to Bairstow, the ninth catch of the match for the flame-haired keeper who scored a brilliant 140 in England's innings.
England ruthlessly wrapped up the last three wickets in 10 minutes.
Dushmantha Chameera was caught by Nick Compton at short leg off Finn for a duck, Lahiru Thiramanne edged Finn to Joe Root at second slip for 16 and Anderson bowled Nuwan Pradeep to complete figures of 5-29 and a match haul of 10-45.