Boris Johnson's decision to suspend parliament is an unlawful abuse of power, lawyers representing businesswoman Gina Miller have said.
Outlining her case against prorogation at the High Court in London, Lord Pannick QC said it breached the legal principle of Parliamentary sovereignty.
He added that a five-week suspension was of "exceptional length", saying in most cases it was for a week or less.
Mr Johnson's lawyers argued prorogation was a political, not a legal, matter.
A judgement is expected on Friday morning.
A similar legal challenge heard at Edinburgh's Court of Session on Wednesday failed.
In 2017, Gina Miller won a case which stopped ministers triggering the Article 50 process - by which the UK leaves the EU - without a vote in parliament.
The prime minister announced on 28 August he wanted the five-week shutdown - a process known as prorogation - to start next week.
This means MPs and peers will not return to parliament until 14 October for the Queen's Speech, when Mr Johnson says he will outline his "exciting agenda" for the new term.
The latest case from Ms Miller - to challenge the legality of the prorogation - is being heard by the Lord Chief Justice Lord Burnett and two other leading judges.
Opening the hearing, Lord Pannick said Mr Johnson saw Parliament as a "threat to the implementation of his policies", in particular whether a deal could be made with the EU.
He said the reason given by Mr Johnson for suspending Parliament - to introduce a new programme of legislation - did not require a five-week suspension.
And he posed the question: "If the prime minister can, unregulated by the courts, advise Her Majesty to prorogue Parliament for five weeks, then why would he not be able to advise Her Majesty to prorogue Parliament for a lengthier period of time?"
Lord Pannick also said that, in his submission, the prime minister "has been very clear" that he viewed Parliament as a "nuisance" and a "detriment".
He pointed to a note in Mr Johnson's own handwriting which said the whole September session of Parliament was a rigmarole introduced to show the public that MPs were earning their crust - and he saw nothing "especially shocking" about this prorogation.
Lord Pannick argued that this showed Mr Johnson did not understand the role of Parliament in proposing and considering legislation and holding the government to account during "such a critical period".
Another document released to the court were the minutes of a Cabinet conference call on 28 August, in which Boris Johnson warned ministers that there was a "high chance" he would fail to get a new deal with the EU over Brexit.
In a summary of final remarks about the progress of talks with Brussels, the minutes read: "Concluding the prime minister said that progress with the EU should not be exaggerated but it was substantial.
"Whilst there was a good chance that a deal could be secured, there was also a high chance that it could not."
Days earlier, in a BBC interview at the G7 summit, Mr Johnson had said that a deal was "touch and go".
In his case, Lord Pannick went on to stress that the court was not being asked to express any view about the wisdom of the UK leaving the European Union, nor what action should be taken before 1 November.
"If the prorogation is declared unlawful, it will be entirely for Parliament to decide what to do when it sits during the relevant five weeks.
"Our case is concerned - and only concerned - with issues of law," he said.
In response, Sir James Eadie QC, representing Mr Johnson, argued proroguing Parliament was an inherently political act - not a matter for the courts and law.
He also said the sitting of Parliament was a matter of constitutional convention rather than law - and judges cannot tinker with conventions as they are a matter for political balance.
Sir James rejected Gina Miller's lawyer's claim that prorogation was intended to deprive Parliament of an ability to legislate, specifically in relation to a no-deal Brexit.
"The last few days [in Westminster] indicate that that is just simply untenable in fact," he said, adding that recent events illustrated the "political maelstrom into which the court is being invited".
Sir John Major, former Conservative prime minister, was given the go ahead to join her legal action and intervene in the case in writing.
He believes Mr Johnson's move is aimed at preventing MPs from opposing a no-deal Brexit.
Lord Advocate James Wolffe QC, who is Scotland's senior law officer, the Welsh government and shadow attorney general Shami Chakrabarti have also been given permission to intervene in writing.
It is not possible to mount a legal challenge to the Queen's approval of the suspension but Sir John and Ms Miller believe they can legally challenge the advice the Queen's prime minister gives her.
Today's legal battle between Gina Miller and the government - her second major constitutional challenge on the balance of power between ministers and Parliament - comes down to a headline question and what may be a very fine judgement.
Did Boris Johnson manifestly abuse his power by advising the Queen to prorogue Parliament for an exceptional five weeks - and can judges do anything about it if he did?
Ms Miller's QC, Lord Pannick, avoided suggesting that prime ministers don't have the right to halt Parliamentary business ahead of a Queen's Speech.
He focused on the manner in which Mr Johnson went about this prorogation and its duration when "time is of the essence".
The outcome may feel academic because of the progress of the no-deal Brexit-blocking bill in the Lords.
But the Supreme Court could ultimately deliver a ground-breaking judgement on the sovereignty of Parliament.
What other legal challenges are taking place?
In Scotland, a group of politicians are attempting to overturn a court ruling made on Wednesday that Mr Johnson's plan to shut down parliament ahead of Brexit is, in fact, legal.
Lord Doherty, sitting at the Court of Session, said the prime minister had not broken any laws by asking the Queen for a five-week suspension as it was for Parliament and the electorate to judge the prime minister's actions - not the courts.
The group of more than 70 largely pro-Remain politicians, headed by SNP MP Joanna Cherry, argue that Mr Johnson is exceeding his powers and attempting to undermine democracy by avoiding parliamentary scrutiny before the UK leaves the EU on 31 October.
After Lord Doherty's ruling, a UK government spokesman said: "We welcome the court's decision and hope that those seeking to use the judiciary to frustrate the government take note and withdraw their cases."
In Belfast, a campaigner for victims of the Troubles is due to bring a case on Friday arguing that no-deal could jeopardise the Northern Ireland peace process.
The lawyers of Raymond McCord - whose son was murdered by the loyalist Ulster Volunteer Force in 1997 - argue no-deal would endanger the Good Friday Agreement and suspending parliament is unconstitutional.
At a preliminary hearing on Thursday, a lawyer for the government argued for a delay to the case, saying Hilary Benn's no-deal Brexit Bill had "changed the paradigm" and altered the need for an urgent judgment.
But Mr McCord's lawyer said the case was ready to proceed and while it "looked as if" the bill would become law, "we don't know".
He also said he was "sorry to have to make the proposition" that the government might not abide by the law.