Cabinet secretary Sir Gus O'Donnell will step down at the end of this year, Number 10 said on Tuesday.
Britain's most senior civil servant will be replaced by current Downing Street permanent secretary Jeremy Heywood, who will take over O’Donnell’s responsibilities as cabinet secretary.
However the second strand to O’Donnell’s job as head of civil service will be appointed separately.
Sir Gus O’Donnell said today that it had been a "privilege" to work with four prime ministers and the current government.
“I am also very proud of the great work civil servants perform up and down the country and overseas. I am passionate about the importance of our traditional values of honesty, objectivity, integrity and impartiality. I am also confident that the Civil Service will demonstrate the professionalism and pace to face the challenges of delivering better services with fewer resources. I wish Jeremy every success in his new role.”
Throughout his long career O'Donnell has been described as John Major's favourite bureaucrat, "very warm" by Jeffrey Archer and thought to possess "wondrous interpersonal gifts".
Prime minister David Cameron described him as the "outstanding" civil servant of his generation.
"His support during the formation of the Coalition Government, and in ensuring the smooth and effective running of Cabinet Government since I took office, has been invaluable.
"He has given dedicated and professional service under five Prime Ministers, the last four of whom he has worked with very closely. I know that they will join me in thanking him for all his hard work, patience, loyalty, good humour and sound judgement.
"The strength and impartiality of the Civil Service in the UK is rightly admired around the world and something we should be proud of. Gus O’Donnell’s career reflects the strengths of the Civil Service, and his leadership has helped to safeguard it for the future.”
He had been due to step down before the next election.