Wagner, 29, who has featured in 18 Tests, will predominantly play first-class cricket during his time at Old Trafford.
"Neil is a world-class bowler with a tremendous pedigree," head coach Ashley Giles told the club website.
"Having him available for such an extended period will give our Division One campaign a real boost."
South Africa-born Wagner made his Test debut for the Black Caps against the West Indies in 2012 and has taken 67 Test wickets at an average of 33.34.
He had a stint in England with Northants in 2014 and has taken 431 first-class wickets at an average of 27.20 since making his first-class debut in 2006.
"I have always admired Lancashire, ever since playing in the Liverpool Lancashire league for Ormskirk in 2008," Wagner said.
"I'm very much looking forward to joining up with the squad and working with Ashley and the rest of the team."
Lancashire have signed New Zealand seamer Neil Wagner as their overseas player for the 2016 campaign.