The case was put before the Court of Session in Scotland by anti-Brexit campaigners seeking a legal order to compel Johnson to ask the EU for an extension in case of a no-deal Brexit.
It followed a law passed in the House of Commons, known as the Benn Act, which orders the prime minister to write to the EU for an extension until Jan. 31, 2020 if London and Brussels fail to agree a deal by Oct. 19.
The blow in the race to find a solution came after the European Commission in Brussels said there is no ground to accept a request from Britain for "intensive" weekend negotiations two weeks before an EU summit on Oct. 17. Instead, the Brexit negotiations will resume on Oct. 7.
The court undertaking in Scotland came only weeks after Johnson said he would "rather die in a ditch" than ask Brussels to delay, coupled with regular messages that Britain will end its membership of the EU on Oct. 31 with or without a deal.
On Friday night he tweeted "new deal or no deal -- but no delay."
The legal action against the British government is being brought by Scottish National Party member of parliament and barrister Joanna Cherry, barrister Jolyon Maugham and businessman Vince Dale.
Court papers have been flying in the face of Johnson's comments since he succeeded Theresa May as prime minister this summer.
It has left political observers pondering on what Johnson has planned to reconcile his message about a deal or no-deal departure.
The BBC on Friday quoted a spokesperson from Downing Street as saying that the government will comply with the Benn Act, and the law only "imposes a very specific narrow duty when it comes to requesting an extension."
"People will have to wait to see how this is reconciled," the source told the BBC.
The Daily Telegraph reported that Maugham said Johnson was saying two contradictory things at the same time.
"We are concerned that he (Johnson) cannot be trusted to do what he has said to the court," said Maugham. "The court was being asked to order him to do it (seek the extension), and if he does not act as parliament has mandated, there will be consequences for him personally."
Andrew Webster, the barrister representing the British government, said there is no need for a court order to be made forcing a letter requesting an extension because the court has it on record it will be sent.
"What we have is a clear statement on behalf of the prime minister and government as to what it will do in respect to the requirements of the 2019 act (the Benn Act). They have been put on record so there can be no doubt," he said.
Although Irish Prime Minister Leo Varadkar said Friday that the Brexit plan falls short in a number of aspects, Ireland's Deputy Prime Minister Simon Coveney sent a rather encouraging message.
Coveney said he does not believe a Brexit deal is a mission impossible, and he believes an agreement might be struck later this month despite concerns over Johnson's new Brexit plan.
"I believe the prime minister wants to get a deal this month. We will certainly work to this time frame," Coveney told journalists outside Hillsborough Castle.
"If it's not possible, Ireland has always said we would prefer an extension to no deal, but that's the Irish position. This is not mission impossible. There is a deal to be done here," he added.
The crunch date is expected Oct. 17 when the EU Council is scheduled to hold its meeting in Brussels.