The 36-year-old made 14 appearances in the County Championship last season as Middlesex won the Division One title for the first time since 1993.
"James remains a high-quality cricketer," said managing director of cricket Angus Fraser.
"As a senior player he sets a wonderful example and he remains motivated."
He added: "James worked as hard as anybody in helping the club win its first Championship title for 23 years."
Franklin joined Middlesex in 2015 and has featured 70 times for them in all formats of the game.
The left-hander played 31 Tests for New Zealand, 110 one-day internationals and 38 Twenty20 games between 2001 and 2013.
Middlesex captain James Franklin has signed a new contract, which will keep the former New Zealand all-rounder at Lord's until the end of 2018.