Shotton becomes Owen Coyle's 12th signing of the summer, with the club confirming that the deal was completed just two minutes before the deadline on Monday evening.
"It's been a whirlwind evening and we only found out really late about Wigan's interest. I can't wait to get going now and meet the players," Shotton told the club's official website.
"As soon as I spoke to the gaffer and he told me how much he wanted me, I made up my mind and now I can't wait to get started. The club is obviously moving forwards and the squad here is really impressive. The competition for places is intense but that is what all players need and I'm going to do everything I can to win a place in the team."
Shotton signed his first professional contract for Stoke in 2007.