Officials from London and Edinburgh have been meeting for weeks to hammer out the details. Sticking points included the date and the wording of the question.
On Monday, British Prime Minister David Cameron met with Scottish First Minister Alex Salmond in Edinburgh to approve the deal. No date was set, but the vote is likely to be held in October 2014, as Salmond's nationalists had wished.
The "Edinburgh Agreement" means that the Scottish Government can now propose legislation on the precise wording of the question, the exact date, extending the vote to 16 year olds, finance rules and conduct.
If Scotland does break away it will end more than 300 years of political union with England.
An ebullient Salmond said he is confident the independence movement can triumph. "Do I believe we can win this? Yes I do," he told reporters. "It is a vision of a prosperous and compassionate Scotland and that will carry the day."
He said the advantages of separation from Britain would become clear, and that his government envisioned "a Scotland with a new place in the world — as an independent nation."
Cameron did not immediately comment. But the prime minister is expected later to praise Scotland's two governments for coming together to deliver a "legal, fair and decisive" referendum that now puts the decision on a separate Scotland or a United Kingdom in the people's hands.
"This marks the beginning of an important chapter in Scotland's story and allows the real debate to begin," Cameron will say in a speech later Monday, according to prepared remarks released by his office.
Cameron and other pro-union politicians had pressed for the vote to be held earlier than 2014, because opinion polls show that only between a quarter and a third of Scots currently favour leaving the union.