The Scotland international arrives from Besiktas for an undisclosed fee - believed to be £1.8million - ahead of City's top-flight return.
The transfer - still subject to international clearance - ends McGregor's 12-month spell in Turkey, where he started 27 games for Besiktas following a move from Rangers.
He told the Hull website: "I'm really excited to be here and I'm happy that everything is done now.
"I can't wait to get started here. This is a great chance for me to play in the Premier League and I'm looking forward to the season ahead."
McGregor's arrival on Humberside follows last week's permanent deal for Egypt winger Ahmed Elmohamady.