The 27-year-old ex-Manchester United player joined the Lions last summer on a one-year deal after being released by Ipswich.
He went on to make 29 appearances in all competitions, with his one goal coming in a 2-1 win away at Nottingham Forest in April.
Speaking to the club's official website, Millwall boss Ian Holloway said: "I saw signs towards the end of last season that Lee could become the player Manchester United thought he might be. I'm looking forward to working with him again next season because I think we will see even more from him."
Martin said: "I knew as soon as Ian Holloway came here that we would be moving in the right direction and he is certainly the manager who can get the best out of me."
Martin joins David Forde in pledging his future to the club after the goalkeeper penned a new three-year deal last week.