McShane has made 98 appearances for the Tigers having initially joined the club on loan from Sunderland in 2008.
He spent five months on loan with Crystal Palace in January 2012 but returned to the first team at the KC Stadium following Steve Bruce's appointment as manager in June later that year.
"I'm delighted to sign a new deal," said McShane, 27, who scored a crucial second goal in City's 2-2 draw with Cardiff which secured a return to the Premier League for the Tigers.
"Last season was such a great season and then I got offered the new contract. I couldn't wait to come in and get it signed and now I can just get on with looking forward to the new season.
"I'm really looking forward to testing myself in the Premier League again. When we got relegated from the top flight in 2010, it was always my aim to get back up there (with Hull City).
"Now I've got the opportunity to play up there again. I'll admit there were times when I didn't think it would happen, but we had such a great season last year and we're back up there now."