Taylor will take up his new deal at the Den when his contract with Leeds expires at the end of the month.
The former Birmingham stopper had already joined the Lions on-loan till the end of the season and played 10 games.
Leeds boss Neil Warnock said: "He's been a great pro over the years and he's got a chance to go to Millwall and do some coaching.
"He's 40 years of age and I didn't feel I could restrict him from that career.
"He'll be leaving here on a free transfer at the end of of the season anyway."