The 432-202 vote was widely expected but still devastating for May, whose fragile leadership is now under siege.
MPs finally got their chance to say yes or no to May's deal after more than two years of political upheaval — and said no.
The vote means further turmoil only 10 weeks before the country is due to leave the EU on March 29.
It is not clear if it will push the government toward an abrupt "no-deal" break with the EU, nudge it toward a softer departure, trigger a new election or pave the way for a second referendum that could reverse Britain's decision to leave.
May, who leads a fragile Conservative minority government, has made delivering Brexit her main task since taking office in 2016 after the country's decision to leave the EU.
"This is the most significant vote that any of us will ever be part of in our political careers," she told MPs as debate ended. "The time has now come for all of is in this House to make a decision, ... a decision that each of us will have to justify and live with for many years to come."
But the deal was doomed by deep opposition from both sides of the divide over UK's place in the bloc. Pro-Brexit MPs say the deal will leave Britain bound indefinitely to EU rules, while pro-EU politicians favour an even closer economic relationship with Europe.
The government and opposition parties ordered MPs to cancel all other plans to be on hand for the crucial vote. Labour legislator Tulip Siddiq delayed the scheduled cesarean birth of her son so she could attend, arriving in a wheelchair.
The most contentious section of the deal is an insurance policy known as the "backstop" that is designed to prevent the reintroduction of border controls between the UK's Northern Ireland and EU member Ireland.
Assurances from EU leaders that the backstop is intended as a temporary measure of last resort completely failed to win over many British sceptics, and the EU is adamant that it will not renegotiate the 585-page withdrawal agreement.
Arlene Foster, who leads Northern Ireland's Democratic Unionist Party — May's parliamentary ally — said her party voted against the deal because of the backstop.
"We want the PM to go back to the EU and say 'the backstop must go,'" Foster said.
Parliament has given May until Tuesday NZT to come up with a new proposal. So far, May has refused publicly to speculate on a possible "Plan B."
Some Conservatives expect her to seek further talks with EU leaders on changes before bringing a tweaked version of the bill back to Parliament, even though EU leaders insist the agreement cannot be renegotiated.
European Commission president Jean-Claude Juncker returned to Brussels to deal with Brexit issues arising from the vote, amid signals May might be heading back to EU headquarters tonight or tomorrow.
An EU official, who asked not to be identified because of the developing situation, said that it was "Important that he is available and working in Brussels during the coming hours."
May had argued that rejecting the agreement would lead either to a reversal of Brexit — overturning voters' decision in the 2016 referendum — or to Britain leaving the bloc without a deal.
Economists warn that an abrupt break from the EU could batter the British economy and bring chaotic scenes at borders, ports and airports.
Business groups had appealed for MPs to back the deal to provide certainty about the future.
Mike Hawes, chief executive of the Society of Motor Manufacturers and Traders, said parliamentarians "hold the future of the British automotive industry — and the hundreds and thousands of jobs it supports — in their hands."
"Brexit is already causing us damage in output, costs and jobs, but this does not compare with the catastrophic consequences of being cut adrift from our biggest trading partner overnight," he said.
DELAY BRITAIN'S EXIT
With Parliament split, there is increasing speculation that Britain might seek an extension to the two-year exit process that is due to expire on March 29.
Even if a withdrawal deal is approved soon, there may not be enough time for Parliament to pass all the legislation that needs to be in place by Brexit day.
Some ministers are urging May to delay Brexit and then consult MPs in a series of "indicative votes" to see if a majority can be found for a new plan. And various factions of MPs are exploring ways to use parliamentary rules to wrest control of the Brexit process from the government.
A delay would likely also be needed in the event of two other possible scenarios: a general election, or a second referendum. Any delay to the date of Brexit would require unanimous approval from leaders of the EU's remaining 27 member states.
HOLD AN ELECTION
If the deal is defeated by a big margin, May will face pressure to resign. But she has vowed to carry on, and there is no way her Conservative Party can evict her as leader — after a failed no-confidence vote in May's leadership by Conservative MPs in December, she is safe from another challenge for a year.
The main opposition Labour Party says it will try to trigger an election by calling a no-confidence vote in the whole government. But the vote will fail unless some members of the governing Conservatives or the government's allies from the Democratic Unionist Party in Northern Ireland rebel and side with the opposition.
If the government lost a no-confidence vote, it would have 14 days to overturn the result by winning lawmakers' confidence in a new vote — possibly with a new prime minster, if May was persuaded to quit. Barring that, there would be an election, a process that takes five to six weeks.
SECOND REFERENDUM
The campaign to revisit Brexit in a second referendum — driven largely by supporters of the losing "remain" side in the 2016 referendum — has been gathering steam as the pitfalls and complexity of the divorce process become clear.
The Government is firmly opposed, but has warned that it is increasingly likely that the decision to leave the EU could be reversed if May's deal is rejected.
It's unclear whether a majority of legislators would support a new referendum, or what the question would be. Many pro-EU politicians want a choice between leaving on the proposed terms and staying in the EU, but others say leaving without a deal should also be an option.
There's a strong chance any new referendum would be as divisive as the first.
NO DEAL
"No deal" is the outcome few want — but it is also the default option. If the divorce deal is not approved, altered or put on hold, Britain will cease to be an EU member at 11 pm London time on March 29.
The Bank of England has warned that tumbling out of the bloc with no deal to soften the exit could plunge Britain into its deepest recession in nearly a century, and businesses warn the sudden end to longstanding trading agreements with the EU could see gridlock at British ports and shortages of food and medicines.
- AP