A cross-party group of Scottish politicians has won permission for a judicial review of whether the UK can unilaterally revoke Article 50.
The MEPs and MSPs want to get a ruling from the European Court of Justice on whether Brexit could be called off.
Lord Doherty had originally rejected their application for a review, saying it had little prospect of success.
However, after an appeal a panel of judges said there was "a point of substance" to be addressed in the case.
Lord Carloway, Scotland's top judge, overturned Lord Doherty's decision and has allowed permission for a judicial review to proceed.
The legal action was launched by a group of politicians from the SNP, Labour, the Scottish Greens and the Lib Dems following a crowdfunding campaign.
The politicians, who are backed by the Good Law Project campaign group, said they were seeking "clarity to inform the democratic process" on whether Brexit could be halted, so that politicians know "what options are open to them".
They want their case referred to the EU's Court of Justice to determine whether it would be lawful for the UK to revoke Article 50, the mechanism which was used to trigger exit in March 2017.
However Lord Doherty said that "given that neither parliament nor the government has any wish to withdraw the notification", the question whether or not it could be done unilaterally "is hypothetical and academic".
He said: "The fact of the matter is that parliament has not proposed, let alone enacted, legislation directed to the United Kingdom's withdrawal of its Article 50 notification.
"The government's policy is not in conflict with the legislative will of parliament. Parliament authorised the government to give the notification. Neither parliament nor the government wishes that the notification be withdrawn.
"In those circumstances it is not a matter which this court, or the Court of Justice of the European Union, require to adjudicate upon."
The politicians appealed against this ruling, and this was subsequently considered by a panel of judges in the Inner House of the Court of Session, led by Lord Carloway.
He was critical of the arguments put forward, saying the petition had "significant problems" and calling the position of the UK government "ambiguous".
He said that if the petition was "shorn of its rhetoric and extraneous and irrelevant material and reduced, after adjustment, to a manageable size", then "a case of substance - albeit not necessarily one which is likely to succeed - can be discovered".
Lord Carloway added: "The issue of whether it is legally possible to revoke the notice of withdrawal is one of great importance. On one view, authoritative guidance on whether it is legally possible to do so may have the capacity to influence members of parliament in deciding what steps to take in advance of, and at the time of, a debate and vote on the EU Withdrawal Bill.
"After all, if parliament is to be regarded as sovereign, the government's position on the legality of revoking the notice may not be decisive."
He concluded that there was "a point of substance, albeit one heavily concealed" in the case, "which should be argued in the normal way".
The judge said he would allow some time for the two sides to formulate their arguments before further hearings in the Scottish courts are set.