Responding to the result, the ruling Conservative Party's Leader of the House of Commons Andrea Leadsom said the government meant to publish the advice on Wednesday.
Legislators in the House of Commons found the government in contempt of Parliament for refusing to publish in full the advice it had received from the country's top law officer about the terms of Britain's departure from the EU.
Before the debate, May's government faces another showdown with lawmakers over legal advice about the Brexit deal.
In an address to parliament on Monday, Attorney General Geoffrey Cox claimed publishing the full extent of legal advice he provided the government over the deal would be "contrary to the public interest".
Former attorney general Dominic Grieve's amendment will give MPs more of a say if Mrs May loses the crunch vote on her Brexit deal.
Following hours of debate on Tuesday, the parliamentarians decided the government was guilty of contempt or in other words "any act, or failure to act, that may prevent or hinder the work of either House of Parliament".
Prime Minister Theresa May speaks in the House of Commons.
Prime Minister Theresa May is facing resistance on all sides of the House of Commons to the withdrawal agreement she struck with the European Union last month.
Left-wing Labour said May's defeat next Tuesday would likely trigger a confidence vote to bring down her government.More news: TV Brexit debate between May and Corbyn 'dereliction of duty by BBC'
She said the Government, which had sought to slow down the process by referring the issue to Parliament's Committee of Privileges, had fulfilled the spirit of the order to publish.
That would set up a potential constitutional showdown as Parliament and the government wrestle for control of Brexit's "Plan B".
"We should not let the search for a ideal Brexit prevent a good Brexit which delivers on the wishes of the British people".
But his words did little to soothe some of the deal's most caustic critics, where many Brexit supporters said the so-called backstop for Northern Ireland risked tying Britain into the EU's customs union indefinitely.
The fate of those will determine if her Brexit deal succeeds, whether the United Kingdom could be headed for no deal, a second referendum, or even a general election.
After the vote, the British pound fell to its lowest against the U.S. dollar since mid-August.
In the most extreme no-deal scenario, shopping bills could rise by up to 10% but even in an orderly no-deal withdrawal, with a transition period, grocery prices could rise by 6%, he said. Pro-EU lawmakers and the DUP, which props up her government, say they will vote against, and the main opposition Labour Party says it will try to unseat her.
The ECJ's advocate general Manuel Campos Sanchez-Bordona said the United Kingdom could withdraw its notification to leave the European Union before its exit in March 2019 without needing the approval of the other 27 states.
"This is a huge win for us, and a huge step forward from the highest court in the business, and confirms what we have been hoping for: that the United Kingdom can indeed change its mind on Brexit and revoke Article 50, unilaterally", he said.