The left back joined Latics on loan last season, making 14 appearances before spending the latter part of the season with Shrewsbury Town.
Mills, who joins the club from Burnley, came through the youth ranks at Southampton and is Lee Johnson's first summer signing. The manager spoke of his delight to get the deal done.
He said: "It's a great signing. He's young, hungry and got a lot of potential. We'll give him an identity and a bit of love and I feel he can be a really good player for us."