In a Commons statement, the former chancellor said the “critical” rules he drew up – to balance the budget and reduce debt – must not be abandoned, or taxes raised.
“It would not be right to pass the bill for our day-to-day consumption to our children and grandchildren,” Mr Javid said.
He insisted he still supported the prime minister, but joked about the “Cummings and goings” that triggered his departure two weeks ago – a clear reference to the role of the controversial chief aide.
And he issued a warning if the Treasury was no longer part of “checks and balances” on No 10, after Mr Johnson imposed a joint unit of advisers on his successor, Rishi Sunak.
“A chancellor has to be able to give candid advice to a prime minister so he is speaking truth to power,” Mr Javid said, in front of a clearly-uncomfortable Mr Johnson.
He walked out after refusing to sack his advisers and amid rising tensions over spending plans and Mr Javid jumping the gun with his backing for the HS2 project.
It threw the government into chaos, threatening to delay the Budget on 11 March, which is intended to chart the course for a five-year government.