The judges at the Court of Session in Edinburgh concluded the prorogation was "improper" and "unlawful" and had been done with "the goal of stymying Parliament" and therefore was "null and of no effect".
With seven weeks to go, the government and parliament are locked in conflict over the future of Brexit, with possible outcomes ranging from leaving without a deal to another referendum that could cancel the divorce.
The government immediately appealed, with the case set to be heard in the Supreme Court next Tuesday, and parliament set to remain shut in the meantime.
"You can not break the law with impunity, Boris Johnson".
He says he is working hard to agree new exit terms, after the deal negotiated by his predecessor Theresa May was rejected by MPs, despite European Union leaders insisting the current terms are the best on offer. "What we are trying to do is implement the result of the 2016 referendum".
Suspending parliament to start a new legislative session is normally a routine event that takes place most years.
Opponents said the real reason was to shut down debate and challenges to his Brexit plans. The court was shown documents that showed Johnson was considering prorogation weeks before he formally asked Queen Elizabeth to suspend the legislature.
Buckingham Palace declined to comment on the ruling, saying it was a matter for the government. He has offered to support Johnson's Conservative party in any upcoming election.
With a no-deal Brexit looming, rebel members of the governing Conservatives joined with the opposition to deliver a series of blows to Johnson in the days before Parliament was suspended.
Johnson says he wants to strike a new deal with the bloc after the agreement made by his predecessor Theresa May was rejected three times by Britain's Parliament.
Jolyon Maugham, a lawyer who is part of the claim, said he believed "that the effect of the decision is that Parliament is no longer prorogued".
"The only inference that could be drawn was that the UK Government and the Prime Minister wished to restrict Parliament", the summary said one judge, Lord James Drummond Young, had concluded.
Last week a court in Edinburgh rejected the initial challenge, but this was overturned on Wednesday following an appeal.
European Union leaders, though, are adamant that the onus is on the divided United Kingdom to propose a way out of the Brexit impasse.
It has also triggered civil war inside both of Britain's main political parties as dozens of lawmakers put what they see as the United Kingdom's fate above that of party loyalty.
In a tweet, Robert Buckland QC MP said: "Our judges are renowned around the world for their excellence and impartiality, and I have total confidence in their independence in every case". "There is nothing more democratic in this country than a general election". Its leader Nigel Farage took out newspaper ads Wednesday, offering an electoral pact with the Conservatives if Johnson backed a "clean break" - a no-deal Brexit.