In a political gamble that looks set to define her legacy, the First Minister said the vote’s legality will be determined by the Supreme Court.
If the court strikes down the Scottish Government’s referendum legislation, Ms Sturgeon said the SNP will seek to make the next general election a “de facto referendum”.
Opponents accused her of an “appalling waste of energy and focus” and insisted they would not take part in a “pretend poll”.
The UK Government insisted: “We are clear that now is not the time to be talking about another independence referendum.”
In a long-awaited statement in the Scottish Parliament, Ms Sturgeon named October 19, 2023, as the date for her proposed vote.
She said the people of Scotland “said Yes to an independence referendum by electing a clear majority of MSPs committed to that outcome” last year.
She said she had written to Prime Minister Boris Johnson to “make clear that I am ready and willing to negotiate the terms of a section 30 order with him”.
In 2014, the relevant powers to hold a referendum were granted by the UK Government through a section 30 order.
But Ms Sturgeon added: “What I am not willing to do – what I will never do – is allow Scottish democracy to be a prisoner of any Prime Minister.”
She said a referendum “must be lawful” but the legislative competence of the Scottish Parliament to pass such legislation in the absence of a section 30 order is “contested”.
In a bid to settle the matter, the First Minister said she had asked Lord Advocate Dorothy Bain, Scotland’s most senior law officer, to refer the legislation to the Supreme Court and Ms Bain had agreed.
If the court rules the Scottish Parliament does not have the power to legislate “for even a consultative referendum”, Ms Sturgeon insisted this would show that “any notion of the UK as a voluntary union of nations is a fiction”.
She also stressed it would “not be the end of the matter”.
She said: “I want the process set in train today to lead to a lawful, constitutional referendum and for that to take place on October 19, 2023. That is what we are preparing for.
“But if the law says that is not possible, the general election will be a ‘de facto’ referendum.
"Either way, the people of Scotland will have their say."
A source close to the First Minister said the general election would be fought on the single issue of whether Scotland should be independent.
They said: “We would be saying this is a de facto referendum, and referendums are won on majorities of votes, not seats.
"It’s a de facto referendum on independence, not on having a referendum, and that’s an important distinction.”
The SNP secured 50 per cent of the vote in the 2015 general election in which it won 56 out of 59 Scottish seats in Westminster. In 2019, it won a 45 per cent vote share.
The source said they did not anticipate the Supreme Court case would be “protracted” and they expected a ruling this year.
The court confirmed a reference had been received by the Lord Advocate, adding: “The first step will be for the reference to be referred to the President of the Supreme Court, The Right Hon The Lord Reed of Allermuir for directions.
"He will decide whether there are preliminary matters to be addressed, when the case will be listed (heard), how many Justices will consider the reference, and which Justices will sit on the bench.
“At this stage, we cannot confirm when the case will be heard.”
Ms Sturgeon said her planned referendum would be consultative, but denied this meant it would not have the same status as in 2014.
She said the 1997 devolution referendum, the 2014 independence vote and the 2016 Brexit referendum were all consultative.
The referendum legislation features the same question as in 2014 – “should Scotland be an independent country?”
Earlier this month, the First Minister published the first in a series of papers setting out her updated case for independence.
Documents set to be published in the coming weeks will focus on key issues such as currency, pensions and the border between Scotland and England.
Lorna Slater, co-leader of the Scottish Greens, who have a power-sharing agreement with the SNP, said: “The people of Scotland have repeatedly returned pro-independence majorities to both the Scottish and UK Parliaments. Their democratic will must be fulfilled.”
Scottish Conservative leader Douglas Ross accused the SNP of a “selfish obsession with another divisive referendum”.
He said: “A potentially illegal referendum next year is the wrong priority for Scotland.
"It would distract attention away from our recovery. It will damage efforts to rebuild our country after Covid. It is the last thing a clear majority of Scottish people want.”
Mr Ross said his party “won’t play Nicola Sturgeon’s games”.
He added: “We won’t take part in a pretend poll when there’s real work to be done.”
Scottish Labour leader Anas Sarwar said: “The pandemic Nicola that said she wanted pull us through is gone, and the partisan Nicola Sturgeon, that wants to divide our country, is back – pursuing a referendum that two thirds of Scots don’t want now.
“Worse still, isn’t she using the thank you she was given, and the promise she made to lead us through the recovery, to instead pit Scot against Scot and focus on her priority, her obsession, her purpose. Scotland deserves better."
Scottish Liberal Democrat leader Alex Cole-Hamilton said a referendum drive was an “appalling waste of energy and focus”.
He said: “The First Minister is putting disquiet in her party ahead the needs of this country.”
Pamela Nash, chief executive of Scotland in Union, said: “Nicola Sturgeon is acting against the will of the people of Scotland.
“Poll after poll shows that the vast majority of us do not want a second referendum.
“The First Minister’s announcement is a disgraceful waste of resources and public money.”
A UK Government spokeswoman said: “People across Scotland want to see both of their governments working together on the issues that matter to them.
"That includes tackling the cost of living, ensuring energy security, leading the international response against Russia’s invasion of Ukraine and growing our economy. That remains our priority.
“A decision has been taken by the First Minister to publish a Bill, and the Lord Advocate has made a referral to the UK Supreme Court.
"UK Government law officers will now consider their response.”