"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", Javid later told the BBC.
Javid turned down the role of finance minister in Prime Minister Boris Johnson's new cabinet as he was asked to replace all his advisers, according to a source close to Javid.
Sunak appears more aligned with Johnson than his predecessor in backing a looser fiscal policy, noted Paul Dales, the chief United Kingdom economist at Capital Economics.
Mr Javid's resignation comes amid rumours of tensions between him and Mr Johnson's senior advisor Dominic Cummings.
Indian-origin politician Rishi Sunak was appointed as the UK's new finance minister on Thursday by Prime Minister Boris Johnson in a Cabinet reshuffle.
Shadow Chancellor John McDonnell said: "This must be a historical record with the government in crisis after just over two months in power".
The Prime Minister's official spokesman said that preparations for the Budget would continue under the new Chancellor. "A government in chaos within weeks of an election", he said on Twitter. Next month's budget was planned to show a key part of Johnson's vision for the country outside the world's largest trading bloc.
Britain and the European Union are aiming to have a deal covering trade, security and other areas in place by the time a post-Brexit transition period ends on December 31.
Home Secretary Priti Patel, Foreign Secretary Dominic Raab, Chancellor of the Duchy of Lancaster Michael Gove, Justice Secretary Robert Buckland, International Trade Secretary Liz Truss and Health Secretary Matt Hancock were all confirmed in their existing roles.
- Esther McVey lost her job as housing minister. He was Parliamentary Under-Secretary of State for Local Government in the Theresa May government. Smith had been widely praised for helping to end the political deadlock that left Northern Ireland without a regional government and assembly for three years.
Sharma, 52, was also appointed as the minister in charge of the UK's COP26 climate change summit.
Andrea Leadsom, business secretary, also got her walking papers.
- Microsoft launches new dev tools for building Windows 10X dual-screen experiences
- Brad Pitt wins maiden acting Oscar
- Record rainfall brings flooding but puts out mega-blaze
- Sharp rise in brain injuries from Iran raid on United States base
- Attorney General William Barr to Testify Before House Judiciary Committee
- Talent Not an Issue for England's New Manager
- United and City looking to create El Classico in Manchester
- Top smartphones for gaming
- Man Utd boss Solskjaer: Ighalo desperate to play for us
- Cruise ship rejected by five ports runs out of options