It is the first time in modern history that any Government has been found in contempt and means the highly sensitive advice provided by Attorney General Geoffrey Cox will be published, in contravention of long-standing practice.
At a rowdy session of Parliament, Attorney General Geoffrey Cox outlined the legal advice he had given to the government, including over a "backstop" arrangement to prevent the return of a hard border between Northern Ireland and European Union member state Ireland if a future U.K. -EU trading deal is not reached in time.
The government suffered another blow just one hour later when parliament also voted in favour of an amendment that will give greater decision-making powers to MPs if, as expected, May's deal is voted down next week.
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.
"By treating Parliament with contempt, the Government has proved it has lost its majority and the respect of the House", Sir Keir said.
The debate will be held after an intervention by House of Commons Speaker John Bercow.
But the deal still needs to be passed by a majority of British MPs in Parliament.
"I promise you today that this is the very best deal for the British people and I ask you to back in the best interest of our constituents and our country".
Conservative House leader Andrea Leadsom told MPs that May's government had a right to receive confidential opinions that were unhampered by political considerations.
Advocate general Manuel Campos Sanchez-Bordona's non-binding opinion said Article 50 allows the "unilateral revocation of the notification of the intention to withdraw from the European Union, until such time as the Withdrawal Agreement is formally concluded".
But May has no intention of revoking the notice, her spokesman said, despite facing a daunting struggle to secure parliament's approval in the key vote on December 11 after her plan was criticised by Brexit supporters and opponents alike.
Before the debate, May's government faced another showdown with lawmakers over the legal advice about the Brexit deal.
Meanwhile, Bank of England Governor Mark Carney hit back at "unfair" criticism, after pro-Brexit MPs accused him of scaremongering.
"It does nothing, in any event, to change the clear position of the government that Article 50 is not going to be revoked", May's spokesman said.
The debate is likely to affect the upcoming parliamentary vote.
Defeat would leave the United Kingdom facing a messy, economically damaging "no-deal" Brexit on March 29 and could topple the prime minister, her government, or both.
Never before has the full legal advice of any attorney general been published in its entirety. Lawmakers are due to hold five days of discussion before voting December 11 on whether to accept or reject the agreement, which lays out the terms of Britain's departure from the bloc on March 29 and sets the framework for future relations with the EU.
"I'm focusing on ... getting that vote and getting the vote over the line", she said.