Philip Hammond said he will quit the Government before Boris Johnson becomes Prime Minister.
The Chancellor has confirmed that he will resign before Theresa May goes to see the Queen to tender her resignation on Wednesday.
Asked on the BBC One's Andrew Marr Show if he thought he would be sacked, Mr Hammond said: "No, I'm sure I'm not going to be sacked because I'm going to resign before we get to that point.
"Assuming that Boris Johnson becomes the next prime minister, I understand that his conditions for serving in his government would include accepting a no-deal exit on the 31st October and it's not something that I could ever sign up to.
"It's very important that the prime minister is able to have a chancellor who is closely aligned with him in terms of policy and I therefore intend to resign to Theresa May before she goes to the Palace to tender her own resignation on Wednesday."
Meanwhile, Brexit Secretary Steve Barclay said he told the EU that it is difficult to envisage how the Withdrawal Agreement will pass the Commons if nothing is changed.
"The current text of the Withdrawal Agreement - if nothing at all is changed - then I didn't see that going through the House of Commons," he told Sky's Sophy Ridge on Sunday.
"It's been rejected three times and since then we've had the European elections where, if anything, the House has further polarised, and so what I was very openly and honestly sharing with them was an update on the political scene in England.
"I think if the text isn't changed in any way, then it is difficult to envisage how that will go through the House of Commons."
Mr Barclay also sought to downplay a suggestion by Chancellor Philip Hammond that a no-deal Brexit could cost the Exchequer up to £90 billion.
He said: "The figure you quote relates to a Treasury forecast for 2035 - a full 15 years after the end of the implementation period - and it also assumes that the Government would take absolutely no action in response to a no-deal."