The High Court ruled last week that MPs must vote on whether the UK can start the process of leaving the EU. The UK government immediately said it would appeal to the Supreme Court, with a hearing due next month.
The Lord Advocate, Scotland’s most senior law officer, will now apply to be heard in the case.
He will argue that the consent of the Scottish Parliament should also be sought before Article 50 is triggered.
Prime Minister Theresa May believes that the result of the EU referendum – and existing ministerial powers – means MPs do not need to vote on the triggering of Article 50.
But a panel of three High Court judges agreed with campaigners that the move would be unconstitutional, and that parliament would need to vote before the formal process of leaving the EU can begin.
The Scottish government had legal representatives observing the case, and later said it was considering whether to become directly involved.
Confirming that it would seek to intervene, First Minister Nicola Sturgeon said she believed Scotland should be treated as an “equal partner” in the United Kingdom.
If the Supreme Court was to allow the Scottish government’s intervention and ruled against the UK government, it would mean there would have to be a vote on Article 50 in Holyrood as well as in Westminster.
Ms Sturgeon stressed that she was not attempting to veto the process of England and Wales leaving the EU.
But she said the “democratic wishes of the people of Scotland and the national parliament of Scotland cannot be brushed aside as if they do not matter”.
Scotland voted to remain in the EU by 62% to 38% in June’s referendum, while the UK as a whole voted by 52% to 48% to leave.
Ms Sturgeon has pledged to do all she can to protect Scotland’s place in Europe, and to maintain its membership of the single market.
The first minister said: “The Scottish government is clear that triggering Article 50 will directly affect devolved interests and rights in Scotland.
“And triggering Article 50 will inevitably deprive Scottish people and Scottish businesses of rights and freedoms which they currently enjoy.
“It simply cannot be right that those rights can be removed by the UK government on the say-so of a prime minister without parliamentary debate, scrutiny or consent.”
She also urged the prime minister to “live up to her promise to treat Scotland as an equal partner in the United Kingdom and listen to the will of the people of Scotland”.
Ms Sturgeon is due to unveil proposals for a “flexible Brexit” – which would see Scotland remain in the single market even if the rest of the UK leaves – in the coming weeks.
By BBC assistant political editor Norman Smith
As if Theresa May didn’t have enough on her plate following last week’s High Court ruling forcing the government to give MPs a say before Brexit is triggered, now the Scottish government has piled in.
In effect it has said if MPs are going to be given a say, the Scottish Parliament should also have to give its approval.
The difficulty for Mrs May is that she knows the Scottish Parliament is overwhelmingly opposed to Brexit and her fear will be that Nicola Sturgeon is in effect threatening to blow Brexit out of the water.
Scotland’s first minister insists she is not playing the veto card. She respects the right of the rest of the UK to leave the EU, but wants to protect the interests of Scotland which voted against Brexit.
It may be she is simply trying to increase her leverage over Theresa May to try and secure a particular Brexit deal for Scotland – something Mrs May has already ruled out.
But there is another problem and it is on delay – the danger that Brexit gets snarled up in the courts.
We have already had the High Court ruling – the Supreme Court will decide on the appeal in January – and now Scottish lawyers are piling in and the danger is the timetable of triggering Brexit by March gets put through the legal shredder.
All five parties in the Scottish Parliament backed remaining in the EU ahead of the referendum, but the Scottish Conservatives, Labour and Liberal Democrats have warned Ms Sturgeon against using the result to push for a second vote on Scottish independence.
Scottish Labour said it supported the objective of getting the “best possible deal for Scotland”, which it said meant “remaining part of the UK and retaining a close relationship with the EU.”
The party’s Europe spokesman, Lewis Macdonald, said: “Rather than spending the next six weeks appealing to the Supreme Court, the UK government’s time would perhaps be better spent getting on with outlining a clear plan for Brexit.”
Scottish Lib Dem leader Willie Rennie welcomed Ms Sturgeon seeking to join the legal action against what he described as the “unjust and undemocratic” use of the Royal Prerogative to invoke Article 50.
He added: “Theresa May could end all this and simply accept that there must be a democratic vote before Article 50 is invoked. However she chooses to waste time and money fighting the decision made so she can impose an unwanted hard Brexit on the United Kingdom.”