He joins Ipswich for a fee of £12m plus £3m in bonuses.
“I’m really excited to sign for the club,” O’Shea told TownTV. “It was really hard not to pay attention to everything the team was able to achieve last season and to have the chance to join a club with such ambition and momentum was really attractive.
“The manager (Kieran McKenna) was a huge part of why I wanted to come here and I’ve really admired what he and the team have done over the last couple of seasons, so at this stage of my career it’s the perfect time to make the move.
“I want to play in the Premier League and test myself against the best players in the world, which is something I want to do for as long as possible, and I can't think of a better place to do that.
“I know quite a few of the lads in the squad and the style of play really suits me, where I can show my strengths and improve my weaknesses, so I’m looking forward getting to work as soon as possible and being part of the culture.”