Manager Chris Wilder has moved quickly to fill the space in his squad created by Chris Hackett’s loan move to Barnet on Thursday.
Martin, who began his career at Manchester United, has been a fringe player at the New Den this season, although he did play in the Lions’ 2-0 Johnstone’s Paint Trophy win over the Cobblers in October.
Martin is 28 and can either play wide or as a central attacker.
“Lee is a welcome addition to the squad in a busy and important part of the season,” said Town boss Chris Wilder.
“We have games coming thick and fast at the moment and Lee adds to what we have.
“He fits in well with the style we play, he is fit and ready to go and he gives us a boost after we said goodbye to Chris Hackett this week.
“He has an excellent pedigree having played a lot of his football at Championship or league one level and we are delighted to welcome a player of Lee’s calibre in to the squad.”
While under contract at Old Trafford, Martin was loaned out to a string of clubs including Royal Antwerp, Rangers, Stoke City, Sheffield United and Nottingham Forest, before being sold to Roy Keane’s Ipswich Town for a reported £1.5m.
He played more than 100 games for the Portman Road club before falling out of favour there, and he signed for Millwall in the summer of 2013.
In all, he has made 46 starts and 23 substitute appearances for the south Londoners, scoring twice.
Taunton-born Martin began this season as a Millwall starter, playing their first three games, but after he was dropped following a 4-0 home defeat to Coventry City, his only other start was that win over the Cobblers, and he hasn’t featured for the Lions at all since the 2-1 home FA Cup defeat to Wycombe at the beginning of December.
In Martin’s career, he has made 194 senior starts and come off the bench 68 times, netting 15 goals.
He is set to go straight into the Cobblers squad for their Sky bet League Two trip to Dagenham & Redbridge on Saturday.