The 24 year-old, who has signed an 18-month deal with the League One side, has been on loan with the club since the start of the current season and manager Neil Harris was pleased to have snapped up the left-sided player.
“Shane has displayed his ability in two different positions for us since he joined on loan,” said Harris, “so naturally I'm delighted that he is now with us on a permanent basis.
“He has shown a real desire to stay here and is of an age where he needs to be playing football regularly for the sake of his own development, and we have given him that opportunity.
“I believe that it is a fantastic piece of business and I would like to thank the board for giving me the opportunity to buy a player of Shane’s quality and age.”
Ferguson, who has won 22 full International caps, came through the youth ranks at Newcastle United but in recent seasons he has found first team football hard to come by at St James’ Park and has been loaned out to Birmingham City and Rangers.
“It’s a relief to get the deal done,” admitted Ferguson on the club’s official website, “I’ve been keen to get everything sorted and I’m now really looking forward to my future with Millwall.
“I’ve loved every second of my time here so it was a no-brainer to sign on a permanent basis. My task now is to help the club get back where they belong, which hopefully can be done this season.”