The 35-year-old, who made 18 Premier League appearances for Harry Redknapp's side last campaign, was a key part of the Rangers team that won promotion in 2011.
The formerNotts County man could go straight into Steve Lomas' squad for Saturday's clash with Ipswich.
Derry told the club's official website: "I'm absolutely chuffed to bits to be at Millwall. I'm here first and foremost to play football and to help the club get further up the league than they were last year.
"The passion of the place and the supporters is fantastic. My wife's family are all Millwall fans so they're delighted and so am I."