In a three-match contest all square at 1-1, West Indies ended the second day of the third Test on 93 for three in their second innings – a lead of just 22 runs.
Anderson had stumps figures of two for 17 in nine overs.
Shai Hope, West Indies' batting star this series, was 35 not out and Roston Chase three not out.
After Ben Stokes (60) and Stuart Broad (38) had given England a valuable first-innings lead of 71, it was Anderson who fittingly made the breakthrough.
Starting West Indies' second innings on 499 Test wickets, it took the 35-year-old just 12 deliveries to become only the sixth bowler and third paceman with 500 when he bowled Kraigg Brathwaite for four with a superb inswinger.
James Anderson celebrates his 500th wicket © AFP
Anderson, arms outstretched in celebration, ran down the pitch before being engulfed by his joyful team-mates.
As a capacity crowd at Lord's rose to give Anderson a standing ovation, he acknowledged their applause by showing them the ball with which he had made history.
Anderson, in his 129th match at this level, had seen his Test career come full circle after making his debut at Lord's against Zimbabwe in 2003 – a match where he took five wickets in his first innings.
"It was an amazing ovation," Anderson told Sky Sports after Friday's close.
"It's such a special place for me – to get my first wicket and my 500th here is something that will live with me for a long time."
"I've got the ball - it's got a massive dent in it from where it hit the stumps.
"We tried to carry on with it but it was almost split down the middle so we had to change it."
Brathwaite's wicket meant Anderson was the only active cricketer in a 500 club containing the spin trio of Sri Lanka's Muttiah Muralitharan (800 Test wickets), Australia's Shane Warne (708), India's Anil Kumble (619).
He was the third paceman to the milestone, after Australia's Glenn McGrath (563) and West Indies fast bowler Courtney Walsh (519).
West Indies were now six for one and that became 21 for two when Kyle Hope, Shai's older brother, saw his miserable series end when he was lbw to Broad for one.
Stokes was on a hat-trick after taking two wickets in two balls at the end of the tourists' first innings.
Kieran Powell, dropped on two, denied him that prize.
But there was nothing Powell, who made a fine 45, could do when Anderson, from around the wicket, produced an unplayable delivery that speared in towards the left-hander's stumps, only to move away late off a full length and clip the off bail.
Shai Hope, whose twin hundreds had inspired a series-levelling win at Headingley – again showed his class when he cover-drove Stokes for an elegant four.
England finished on 194 all out after resuming on their overnight 46 for four.
Stokes, fresh from his Test-best bowling figures of six for 22 on Thursday, top-scored in a 74 ball-innings featuring 10 fours.
Kemar Roach took five for 72, with West Indies captain and fellow seamer Jason Holder following up with four for 54.
But it might have been a very different story when, just two balls into the second session Stokes, on 24, edged Shannon Gabriel only for Brathwaite to drop a tough chance as he dived far to his left at second slip.
Next ball saw Holder reinforce his slip cordon with a third man but, as if to underline the error, Stokes celebrated his reprieve by driving Gabriel down the ground for four.
West Indies then negated the swing on offer in overcast conditions by bowling too short to tailender Broad, who carved Roach for two sixes before he was last man out.