Having won control of the legislative agenda on Tuesday night, lawmakers wanted to move quickly on a bill that would rule out Mr. Johnson’s plan for a withdrawal by the end of next month even if there is no deal, which many say would cause chaos. On Wednesday afternoon by a vote of 327 to 299, they pushed the bill through a second stage in the two-step process.

The bill now goes to the House of Lords, which must give its assent.

After a night of extraordinary theater in Parliament, Mr. Johnson had confronted on Wednesday a bleak scene scattered with the remnants of his Brexit policy and raising the possibility that the issue could destroy his premiership just as it has the two previous Conservative prime ministers, but more rapidly.