In a blow to Prime Minister Theresa May, MPs voted to give Parliament a legal guarantee of a vote on the final Brexit deal struck with Brussels.
The government had argued this would jeopardise its chances of delivering a smooth departure from the EU.
Despite a last-minute attempt to offer concessions to rebels, an amendment to the bill was backed by 309 to 305.
Ministers said the “minor setback” would not prevent the UK leaving the EU in 2019.
Of the Conservative MPs who voted against the government, eight are former ministers.
One of them, Stephen Hammond, was sacked as Conservative vice chairman in the aftermath of the vote.
“Tonight I put country and constituency before party and voted with my principles to give Parliament a meaningful vote,” he tweeted.
The government said it was “disappointed” at losing – its first defeat on Brexit – despite the “strong assurances” it had offered.
Labour leader Jeremy Corbyn said the defeat was “a humiliating loss of authority” for Mrs May on the eve of an EU summit where leaders will discuss Brexit.
The defeat came after opposition parties joined forces with Conservative rebels during a heated debate in the Chamber on the amendment.
Critics accused those behind the amendment – which was authored by former attorney general Dominic Grieve and championed by other pro-Remain campaigners – of trying to “frustrate” Brexit and tying the government’s hands.
After the result was announced, one of the rebels, former cabinet minister Nicky Morgan, tweeted: “Tonight Parliament took control of the EU Withdrawal process.”
But other Conservative MPs reacted angrily, with one, Nadine Dorries, saying the rebels should be deselected.
The Tory rebels were Mr Grieve, Heidi Allen, Ken Clarke, Jonathan Djanogly, Stephen Hammond, Sir Oliver Heald, Nicky Morgan, Bob Neill, Antoinette Sandbach, Anna Soubry and Sarah Wollaston.
Another Conservative MP, John Stevenson, abstained by voting in both lobbies.
Two Labour MPs, Frank Field and Kate Hoey, voted with the government. (Courtesy BBC)