An independent Scotland would have to apply to Nato as a new state, secretary general Anders Fogh Rasmussen has said.
In an interview published in the Times, Mr Rasmussen is quoted saying Scotland's membership would have to be approved by the other member states.
The Scottish government said membership was "in the strong interests of the rest of the alliance".
Pro-Union campaigners claimed the SNP's plan to join Nato "isn't credible" if it removes Trident nuclear weapons.
"I am not going to interfere at all with a campaign leading up to the referendum in Scotland, but I can inform you about procedures and the facts," Mr Rasmussen told The Times.
"In [the] case that Scotland voted in favour of independence then Scotland would have to apply for membership of Nato as a new independent state.
"A decision on accession would have to be taken by unanimity, by consensus as always in Nato."
He added: "Some aspiring countries have waited for many years. Others enjoy a very short procedure depending on how close they are to fulfilling the necessary criteria."
The UK is a founder member of the Nato alliance, which now encompasses 28 states.
In 2012 the SNP, which currently forms the Scottish government, voted to end its 30-year opposition to Nato. Two MSPs, John Finnie and Jean Urquhart, left the party in protest at the policy change.
The party has maintained support for nuclear disarmament and has committed to removing the UK's Trident weapons system from Scotland if voters back independence in the forthcoming referendum.
Speaking for the Better Together campaign, former UK Defence Secretary Lord Browne said: "Alex Salmond has not explained how he intends to remove our nuclear deterrent whilst simultaneously rejoining a nuclear alliance. It simply isn't credible.
"Today we have the ability to make a difference in our world. We have seat at the top table in Nato, the EU, the UN and the G7.
"Our membership of Nato as part of the UK gives us a level of security that cannot be guaranteed if we vote for independence. Why put that at risk?"
A spokesman for the Scottish government said: "The Nato secretary general has simply outlined the process we are already aware of.
"We have made clear that, following a vote for independence, the Scottish government will notify Nato of our intention to join the alliance and negotiate a transition from membership as part of the UK to independent membership, taking our place as one of the many non-nuclear members.
"Nato's own stated intention is for membership to be open to all European democracies that meet the membership criteria — and given that Scotland occupies a key strategic location in the North Atlantic we believe our continued membership will be in the strong interests of the rest of the alliance."
In a previous interview in June, Mr Rasmussen said Nato had not discussed the implications of a "Yes" vote in the referendum, adding that the issue was "for the Scottish people to decide".