Sajid Javid has said he had "no option" but to resign as chancellor - because Boris Johnson attached conditions to him staying in the role which "no self-respecting minister would accept".
Mr Javid quit after refusing to sack his aides in a row with the prime minister that took Westminster by surprise.
The former chancellor said the condition was something he was "unable to accept" and said: "I felt I was left with no option other than to resign."
He added: "I don't believe any self-respecting minister would accept such conditions and so therefore I felt the best thing to do was to go."
Former chief secretary to the Treasury Rishi Sunak has replaced Mr Javid, telling journalists as he entered the Treasury that he was "delighted to be appointed" and had "a lot to get on with".
On a day when there were expectations of only a moderate shake-up of Boris Johnson's government - little more than two months after the Tories' general election success - Mr Javid sent shockwaves through Westminster by quitting his role.
His departure comes less than four weeks before this year's budget, meaning Mr Javid will leave the Treasury without ever having delivered the set-piece fiscal announcement.
Mr Javid was offered the chance to keep his role but resigned following a dispute with Downing Street over his close aides.
The prime minister demanded the chancellor sack all of his special advisers following turbulence between Number 10 and the Treasury in recent weeks.
The chancellor refused and as a result both sides decided to part company.
Sky News economic editor Ed Conway said: "I can't think of another example of a chancellor who's been effectively removed from office in recent years, let alone just before the budget.
"The budget is a really big moment for the government, which is changing its economic strategy.
"A lot of people have been looking towards the Treasury, looking towards Sajid Javid trying to get a sense of what this new government's economic strategy is going to be in the post-Brexit era.
"They are shocked."
Labour's shadow chancellor John McDonnell claimed the events amounted to a power-grab by Mr Johnson's chief adviser Dominic Cummings.
He said: "This must be a historical record with the government in crisis after just over two months in power.
"Dominic Cummings has clearly won the battle to take absolute control of the Treasury and install his stooge as chancellor."
In a wider shake-up of his government, Mr Johnson had earlier sacked eight ministers before beginning the process of announcing their replacements.
Those told to leave government included Northern Ireland Secretary Julian Smith, Business Secretary Andrea Leadsom and Environment Secretary Theresa Villiers.
Mr Smith's sacking came just weeks after he was widely praised for helping to restore power-sharing government in Northern Ireland.
Irish Prime Minister Leo Varadkar on Thursday spoke of him as "one of Britain's finest politicians of our time", while Northern Ireland First Minister Arlene Foster hailed his "incredible" dedication to the role.
Mr Smith had previously been perceived to be disloyal to Mr Johnson over his Brexit strategy.