Maxwell will join former Australia Test opener Joe Burns and his former World Cup-winning team-mate James Faulkner at Lancashire where he will play across all three formats.
Burns will be available for 10 county championship division two fixtures.
With the World Cup approximately eight months away, Faulkner is keen on getting his international career back on track
Somerset needed only 78 to win, but Maharaj stopped them with 7/37.
At Taunton: Lancashire 99 and 7/2, Somerset 192 At Canterbury: Kent 137, Northamptonshire 71/8
The 28 year-old left-arm-spinner will be available for selection for the club’s last four County Championship games.
The left-arm wrist spinner has an impressive record in his short first class record so far as he has picked up 34 wickets at a measly average of 13.14
This victory eased White Rose Yorkshire's fears of relegation from the First Division of the County Championship.
Joe Root finished the match with 22 and 3; James Anderson with 2 for 90.
The only consolation for Root, who fell for three in the second innings of Yorkshire's County Championship clash away to arch-rivals Lancashire, was that he was caught behind off the bowling of England spearhead James Anderson