The 31-year-old midfielder won 63 caps for Scotland and was part of Steve Clarke’s squad at Euro 2024.
McGregor revealed he had spoken to Clarke this week and, while the national head coach is “disappointed” with the player’s decision, he “can understand the rationale”.
He told Celtic’s website it was a “very difficult” decision but one “I feel is the right one at the right time”.
“It has been a huge honour to achieve 63 caps for my country, as appearing just once would have been a dream come true,” McGregor said.
“So to achieve 63 and be inducted into the Roll of Honour at 50 caps is something I could only have dreamed of as a young kid.
“Throughout my career, I wanted to make myself available for Scotland at all times and whenever selected, give the absolute maximum possible to help the country and represent the supporters with passion and pride.”
McGregor said that “reaching two major tournaments will always be a source of real pride” but had hinted during this summer Euro finals that he had been hindered by fitness issues.
“Of course, like many others, I wish we could have gone further in these competitions,” he added.
“But, nonetheless, it has been a privilege to have played for my country on such a stage and to have represented my country for such a long period.”
Clarke paid tribute to McGregor’s contribution to his team.
“Callum’s consistency of performance and leadership qualities have been a real catalyst in the team’s return to major tournaments,” he told the Scottish FA website.
“He has been a driving force in the middle of the park and, in many ways, is a coach’s dream: he is low maintenance, leads by example and sets the highest standards every day in training and in matches.
“That professionalism and dedication has been a huge influence in our squad. We had a very good chat and, while I am disappointed to lose Callum’s qualities, I can understand the rationale behind his decision.
“He will be missed by his team-mates, the coaches, the backroom staff and, of course, the fans. I would like to thank him for all that he has contributed and helped us to achieve “