The 36-year-old shot-stopper came up through the ranks with Rangers, racking up almost 300 appearances for the club before leaving for Besiktas in 2012.
The 36-year-old spent more than 10 years at Ibrox before his 2012 departure for Besiktas.
"I have played against Allan a number of times in my own career and I know just how fierce a competitor he can be". He has won lots of silverware for this club, and has shone at the highest level in Europe.
Hull hoped he might sign a new deal with the club, having offered him fresh terms with them.
He has a spell on loan at Cardiff City a year ago and has 35 caps at global level with Scotland to his name.
The goalkeeper won eleven major titles with Rangers including league titles in 2009, 2010 and 2011.
"I started training here when I was 12 years old and used to come through the main stand maybe twice a week", said McGregor. We need to make this place [Ibrox] a fortress where nobody wants to come, we need to win games, no matter who you are playing.
"If you keep doing that, as we've seen before, that's what wins you titles".