The 68-year-old, one of the corporation’s most senior executives, will leave his post at the end of the year.
Mr MacQuarrie, a former director of BBC Scotland, was appointed to his current role in September 2016, with responsibility for representing the voice of audiences outside London.
The £325,000-a-year role also saw him assume overall editorial responsibility for all of the content produced by the BBC’s staff in Scotland and its wider nations and regions teams.
In an email to staff, Mr MacQuarrie said that he would be working with the new director-general, Tim Davie, to focus on the corporation’s “impartiality” until he steps down on 31 December.
Mr MacQuarrie, who sits on both the BBC board and its executive committee, said that as the BBC was entering a “new era,” it was the right time for him to “hand the reins over to someone new.” Mr Davie is expected to outline more details about the changes tomorrow.
Having joined the BBC in 1975 as a researcher, Mr MacQuarrie has spent 45 years with the broadcaster, during which time he also held the positions of head of programmes and head of features at BBC Scotland.
A native of Mull and a Gaelic speaker, Mr MacQuarrie introduced daily Gaelic children's programming on television, developed the investigative current affairs programme Prosbaig, and launched the award-winning series Eorpa and De a-Nis?
He wrote in his email: “Managing one of the BBC’s largest and most high profile divisions for the last four years has been a privilege and an honour.
“I’ve enjoyed working with you all to build Nations and Regions as a brilliantly confident and creative part of the BBC.
“There is a lot to do before the end of the year.”
He added: “We have many challenges to face, but I’m sure with all our hard work and determination the BBC will flourish.”
Mr MacQuarrie’s announcement comes at a time of significant change in the BBC’s senior executive roles.
In July, Steve Carson was named as the new head of BBC Scotland, taking over from Donalda MacKinnon.
Mr Carson, who is currently head of multiplatform commissioning, will take over as the corporation’s director in Scotland later this autumn when Ms MacKinnon steps down.
Originally from Belfast, he began his career with the BBC before setting up an independent production company in Ireland.
Mr Davie, meanwhile, only took up his position this month, succeeding Lord Tony Hall in the BBC’s top job.
He spent his first day in the job in Glasgow at BBC Scotland’s Pacific Quay headquarters, a move seen as symbolic of his ambitions.
In a brief introductory note to staff, he said his priority was to make sure that the organisation “represents every part of this country.”
In June, BBC Scotland announced it was cutting 60 jobs as part of efforts to meet savings targets.
The corporation has announced it needs to reduce spending by £6.2m by the end of next March. It blamed the move on "ongoing financial challenges compounded by the effects of Covid-19.”