The Northern Ireland international, 30, who spent the last six seasons in South London and made over 200 appearances for the Lions, has the option of a further 12 months with the club after becoming United's first outfield signing of the close season.
Warne said: "We lost Trevor Clarke. His career was going to go somewhere else so we needed a replacement.
"I wanted some strength down the left side and Shane, with his ability to play in three different positions - left-back, left wing-back, left wing - is a perfect addition.
"I had a Zoom call with him and really liked him. I like the fact that he's played internationally and played in big games. He did really at Millwall All the work and due diligence we had done on him was really good and I just thought he would come in, be good competition for everyone down that side of the pitch and improve us.
"Fundamentally, that's what we try to do in every recruitment window: improve the team. It's not always easy but if you want to improve sometimes your signings can take a little bit longer.
He's got a two-year deal with an option for both for the third year."
On a deal which had been several weeks in the pipeline, Warne said: "Everything seems to take longer unless you just want to throw ridiculous money at people. I think a lot of transfers for a lot of clubs in this window - although there are a few in our league recruiting really fast and aggressively - are taking longer.
"A club like us have to make sure everything is right. I know the player had other options and we're very fortunate that in the end he chose us."