Wright, 22, left Glanford Park last summer when he was not offered a contract to stay - despite the fact it meant the Iron missed out on any potential transfer fee.
He did not secure a new club until November, when he joined Millwall on a short-term deal that was later extended until the summer.
He has played an influential role for Kenny Jackett's side as they climbed away from the relegation zone, making 21 appearances and scoring one goal.
"Signing for Millwall was an easy decision to make. I came here with the intention to stay for many years and I am delighted I am able to do so," said Wright.
"I believe that I can go places with this club and we can push on next season."