Donald Emslie, currently chief executive of SMG's television business, will become acting chief executive while the recruitment process to find a replacement gets underway.
Chris Masters, SMG chairman, said: "It has been a personal privilege to have worked with Andrew and, on behalf of the board, I would like to thank him for his role in restructuring the shape of SMG and helping to position the group for future growth."
Citing Emslie's 20 years experience in the UK media sector and seven years on the SMG board, Masters said he was confident that Emslie would help implement the companies' "ambitious growth plans" and capitalise on the strength of its brands through digital opportunities.
SMG will now be looking for a sucessor to Flanagan and will be interviewing internal and external candidates to fill the role, with an announcement made in due course.
A spokesman for the group said that the company was now looking to take its activities "to the next level of development."
In May, the company reported a 46% increase in pre-tax profits for the year ending December 2005 to £20m from £13.7m.
The success was due to revenue gains at Virgin Radio, which offset the increasing volatility in the advertising market, according to SMG.
If you have an opinion on this or any other issue raised on Brand Republic, join the debate in the .