Anderson took three wickets for 24 runs on the day Rob Key and Ben Stokes revealed they wanted him and Stuart Broad to return to the England Test side.
The Lancashire seamer - who was left out of England's tour to the West Indies - inspired his side to bowl Hampshire out for 246 in the County Championship.
Pakistan fast bowler Hassan Ali was also in the wickets, continuing his excellent start at Lancashire with five for 45. Nick Gubbins was the only standout performer with the bat, hitting 101 for Hampshire.
In reply, Lancashire ended the day 37-1 and trail the hosts by 209 runs.
Jimmy back to his best
On the day Ben Stokes was announced as Joe Root's successor as England's new Test captain, Anderson produced some impressive stuff with the ball.
Anderson was at his controlling best in a first six-over spell which found brisk nibble in both directions, after Tom Bailey had dismissed Joe Weatherley with an in-out set-up.
Ian Holland pushed forward on one which held its fifth-stump line, while James Vince was bereft by a sharp in-ducker which took his outside edge. Anderson's opening stint returned two for six, with four maidens.
Ali, on the back of a nine-wicket bag against Gloucestershire, maintained the pressure Anderson had created.
He slightly squared up Liam Dawson with one that angled away off the seam before a leg-side delivery found its way to third slip via Ben Brown's outside edge four balls later.
Hampshire needed a partnership. They got one through the pugnaciousness of Gubbins and Felix Organ - who put on 92 either side of lunch.
Gubbins spent a portion of his winter playing in Zimbabwe's Logan Cup - scoring a century in two matches - and had begun his Championship season with a handful of starts and a 69 last week versus Kent. He was forced to temper his usual aesthetic to churn to fifty in 133 balls.
Anderson returned to direct some short balls at Organ, who hit a top edge to leg slip for 42 before Keith Barker was dismissed by Ali.
James Fuller juxtaposed Gubbins by upping the tempo with his biffing and bottom-hand favoured shot-making. He was 37 off 19 balls at one point, before slowing slightly to a 49-ball fifty, sharing an 83-run stand with Gubbins.
Gubbins reached his second century for Hampshire since arriving last summer, and the 12th of his first-class career, in 210 balls. But with Fuller bowled by Luke Wells, Ali mopped up the tail ruthlessly to move to 19 scalps so far this season.
Wells and George Balderson had fewer issues against the new ball, although the former tickled Barker behind late in the day.
Broad back in action
Stuart Broad was outperformed on his first game since the final Ashes Test in Hobart in January by team-mate Dane Peterson.
Broad took a wicket in the third of an eight-over spell but Peterson was the star of the show and took eight wickets for 52 runs.
It was the best figures produced at Trent Bridge since Broad's 8-15 against Australia in 2015. Worcestershire were bowled out for 159 after just 41 overs.
Haseeb Hameed - another player looking to stake a claim for an England return - was in action, opening for Nottinghamshire alongside Ben Slater. The pair finished the day on 70 without loss.
READ MORE: Do all-rounders make good Test captains?