The 35-year-old left Middlesbrough at the end of last season and once again hooks up with former Yeovil teammate and now Millers boss Paul Warne.
The Toxteth-born defender will make Rotherham his eleventh club, after starting his career with Liverpool and then playing for a host of sides including Huddersfield, Leeds, Leicester and Cardiff.
Warne said: "I played with Lee at Yeovil when he was a lot younger. I thought if I could ever sign him I would.
"I know exactly what he is like, I have played with him, I know what he is like in the dressing room, I have seen him in the tunnel, I have seen him on the pitch, I have seen him in the worst moments when he is losing and he is a leader, a fighter, a scrapper, a very good footballer.
"He can play in five positions. He doesn't believe his career is over and rightly so.
"He thinks he can bring something to the dressing room, and I think he can. He can help players on and off the pitch and we have seen it already in two days training.
"It was a no-brainer when he became available. I spoke to him and I got him in and the rest is history."