The Supreme Court is to consider United Kingdom ministers' appeal against the ruling.
The court heard the prime minister was sent a note on 15 August asking if he wanted to prorogue parliament from mid-September.
"The Lord President, Lord Carloway, decided that although advice to HM the Queen on the exercise of the royal prerogative of prorogating Parliament was not reviewable on the normal grounds of judicial review, it would nevertheless be unlawful if its goal was to stymie parliamentary scrutiny of the executive", the Judiciary of Scotland wrote in its summary of the opinion.
The petitioners to the Scottish Court of Session case included 13 Welsh MPs, including all four Plaid MPs, Geraint Davies, Lord Hain, Tonia Antoniazzi, Wayne David, Stephen Doughty, Ruth Jones, Anna McMorrin, Madeline Moon, Owen Smith and Jo Stevens.
The appeal judgement ostensibly reverses an initial finding in the same case at Edinburgh's Court of Session last Wednesday.
Members of parliament passed legislation last week seeking to force Johnson to ask European Union leaders for an extension if no agreement is reached in hopes of averting what they see as disastrous effects of a so-called no-deal Brexit.
Such is the furore over the Scottish appeal court ruling the UK Lord Chancellor himself was forced to rebut unofficial government suggestions that judges north of the border were politically biased.
It is now unclear what impact the judgement will have on the current five week suspension of Parliament, a process known as proroguing, which started in the early hours of Tuesday.
"We are disappointed by today's decision, and will appeal to the UK Supreme Court", a spokesperson said. That contradicts the prime minister's stated motive for the move - that his new government needs the time to lay out its agenda in a speech in the middle of next month. The current litigation relating to the legality of the advice to the sovereign to prorogue Parliament is evidence of the wisdom of Powell's dictum.
The judges said the PM was attempting to prevent Parliament holding the government to account ahead of Brexit.
"Court says prorogation was unlawful and null and void - so Parliament must be recalled immediately to allow the essential work of scrutiny to continue".
"Not only was the advice false, but it was known by the prime minister to be false".
Labour's shadow Brexit secretary Keir Starmer said: "This is really important".
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". He announced the plan on 28 August.
It noted that another challenge to the suspension, brought by transparency campaigner Gina Miller, was rejected at the High Court in London last week by judges who said the decision was inherently political and "not a matter for the courts".