Mr Hammond said any new leader trying to “push through a no-deal exit on 31 October” would immediately face the prospect of having to “leave office”.
Asked if he would support a no-confidence motion, Mr Hammond told the BBC’s Andrew Marr it was “hypothetical”, pointing out he had never voted against his party in 22 years.
But he added: “I don’t want to start now having to contemplate such a course of action.”
The warning follows Boris Johnson’s threat to carry out a crash-out Brexit in the autumn in October, if necessary, which rival Tory candidates have quickly copied.
The chancellor dismissed their claims of trying to renegotiate a better deal before than as “a figleaf”, pointing out there would be no time, even if the EU was willing.
“The EU will not renegotiate the withdrawal agreement – I’m quite clear about that. They wouldn’t be able to because of their own political fragility,” he said.
Mr Hammond added: “In fact, the negotiation is a figleaf to do what is in fact a policy of leaving on no-deal terms.”
And he warned: “A prime minister who ignores parliament cannot expect to survive very long.”
The chancellor declined to say which of the eight candidates now running to be Tory leader he would back. Others are expected to join the race.
He said he wanted to hear their plans “to win a general election against Corbyn, their plans for the future”.
On a no-confidence vote, he warned it would be “a dangerous strategy” to be “boxed in with commitments you find it very difficult to deliver on”.
Asked again if he could vote against the government on such a motion, the Chancellor said: “It would challenge not just me, but many of our colleagues, and I hope we will never get to that position.”
Earlier, Mr Raab, warned MPs would be unable to stop him carrying out a crash-out Brexit if he wins the Tory leadership race, vowing to be “resolute”.
The former Brexit secretary ruled out a further Article 50 delay, vowing: “I will not ask for an extension.”
And he added: “It’s very difficult for parliament now to legislate against a no-deal, or in favour of a further extension, unless a resolute prime minister is willing to acquiesce in that – and I would not.