The resignation follows rumours of tensions between Javid and the prime minister's senior adviser Dominic Cummings.
"The prime minister said he had to fire all his special advisers and replace them with Number 10 special advisers to make it one team. A government in chaos within weeks of an election", said John McDonnell, finance spokesman for the main opposition Labour Party.
In the wake of Brexit, Johnson has vowed to take a more interventionist economic approach than some of his Conservative predecessors in order t o boost poorer regions outside the economic hub of London and southeast England. His resignation shakes the government as it faces the challenges of negotiating a new relationship with the 27-nation European Union by the end of this year.
Paul Dales, chief United Kingdom economist at Capital Economic, said Javid had appeared reluctant to increase public borrowing to fund higher spending.
He said Javid's departure should "allow the government to push through even bigger increases in public investment and perhaps resuscitate tax cuts that previously looked dead in the water".
So far, the two sides are far apart in their demands.
Other key ministers held onto their jobs, including Foreign Secretary Dominic Raab, Cabinet Minister Michael Gove and Home Secretary Priti Patel.
Several high-profile women in Johnson's government, including Business Secretary Andrea Leadsom and Housing Minister Esther McVey, were fired.
Johnson had not been expected to change the biggest-hitting posts in his government.
Anne-Marie Trevelyan was promoted to minister for global development, while other big departments - such as foreign, home affairs, trade and health - kept their ministers.
Julian Smith, the Northern Ireland secretary, is another shock sacking after overseeing the restoration of the power-sharing government in Stormont last month - a notable achievement considering a resolution could not be found in the three years prior.
Ultra-loyal Alok Sharma, a former minister for worldwide development, was appointed as the new minister for business and also the head of the COP26 climate change summit, when world leaders will travel to Scotland in November. The 51-year-old Alok Sharma has been appointed as the Business Secretary in the British Cabinet.