The midfielder, who progressed through the Celtic Youth Academy, made his 200th appearance in the 2-0 loss to Hibs at the weekend.
The 25-year-old made his senior debut in July 2014 in a UEFA Champions League qualifier in Iceland against KR Reykjavik, and capped the occasion by netting the only goal of the game.
The Scotland internationla has since added 33 more goals including four in Old Firm matches and strikes against Bayern Munich and Zenit St Petersburg in Europe.
In his four years at Celtic, McGregor has won four league titles, three League Cups and two Scottish Cups, and was part of the double treble-winning team.
Asked if he wanted to be a one-club man, McGregor said: “If I could do that, I’d be absolutely delighted.
“You seen Broony last night, getting to 500 appearances which is testament to attitude, quality, his mentality, everything about him.
“For me to aspire to something like that, I would be very proud of that as well.
“When the manager spoke to me about a new deal it was a no-brainer, I wanted to sign.
“To play in front of these fans at this stadium, at one of the biggest clubs in the world, it is a massive honour, so to be able to do that for the next five years is something I am looking forward to.”