The announcement comes after fresh restrictions were put on large events and hospitality venues earlier this week due to concern over the Omicron variant.
Deputy First Minister John Swinney said a new law would require nightclubs to close rather than have them try to enforce 1m distancing between customers.
He said funding would be made available to support affected businesses.
Mr Swinney said nightclubs would have the option to stay open by effectively becoming a bar – but physical distancing and table service would need to be in place.
He said: “We consider that closure in regulations, combined with financial support, may reduce losses and help these businesses weather what we hope will be a short period until they are able to operate normally again.”
People in Scotland have not been told to cancel their Christmas plans, but have been urged to stay at home as much as possible throughout the rest of the festive period and to limit any gatherings to three households.
Mr Swinney told MSPs that there had been a “rapid acceleration of cases driven by the Omicron variant” in recent weeks, with concerns that the faster-spreading strain could overwhelm health services – despite early evidence that fewer people are needing hospital treatment than with other variants.
The deputy first minister said “we have to reduce dramatically the level of social interaction if we want to interrupt the circulation of Omicron”.
Nightclubs were only allowed to reopen in August, having been shut for longer than almost every other sector during the pandemic, and had been subject to vaccine certification rules since October.
The Scottish Conservatives said closing them again was “a further setback to a sector already on its knees”.
MSP Murdo Fraser said: “I understand that this is a fast-moving situation, but when announcing this enforced shutdown, John Swinney should have spelt out the exact details of the support package that will be given to nightclub businesses,.
“The SNP government has been given an extra £440m in assistance from the UK government. They need to get that money out the door and into the hands of beleaguered Scottish businesses immediately.”
National clinical director Jason Leitch said the decision to close nightclubs took account of typically younger crowds who may not be vaccinated.
Speaking to the BBC’s Lunchtime Live programme, he said: “The thing that really scares us about this [variant] is its attack rate. That’s why you can hear our tone and our fear rising a little.
“It’s one of the reasons nightclubs have unfortunately had to be closed down. That population tends to be slightly less protected – not because they’re not actually coming forward in big numbers but because it’s taken us a bit longer to get to that age group. And it’s an environment in which the virus enjoys.”
He added that Omicron spreads particularly quickly in unventilated, crowded and indoor places, meaning there were concerns around transportation, homes, pubs and other hospitality venues.
‘Nightmare before Christmas’
However, Donald MacLeod, owner of the Cathouse and Garage nightclubs in Glasgow, accused the Scottish government of “scaremongering” and “ignoring” evidence which suggests Omicron is milder than other variants.
He also said he had not heard any details on when promised government funding would be available to businesses.
“It’s certainly not going to be in place before Christmas,” he said. “This is a nightmare before Christmas for all manner of businesses – ever since Public Health Scotland went rogue two weeks ago and scared everybody off the streets, the economy has been sliding in a vortex ring of doom and gloom.
“And nobody is putting their hands up saying how are we responsible for this? This is disgraceful, this is no way to run an industry never mind a country. It’s contemptuous.”
New restrictions on public events will come into force on Boxing Day, limiting outdoor events to 500 people – meaning large Hogmanay events have been cancelled, and football matches will be played in effectively empty stadiums.
The Scottish Premiership has already decided to start its winter break after Sunday’s matches rather than on 3 January to avoid playing more matches without fans.
Indoor events will be limited to 200 people seated, or 100 standing, and hospitality premises will have to return to table service while enforcing physical distancing between different groups of customers.
Mr Swinney told Holyrood’s Covid-19 committee that talks had been held with industry representatives about how this could realistically be enforced in nightclubs, and said fresh regulations would be laid requiring them to “not operate as such for this three week period”.
The rules – which will affect about 150 clubs – will come into effect from 05:00 on 27 December, and will be reviewed three weeks later on 11 January.
He said the government was “acutely aware” of the financial impact on firms, saying details of a £375m support package would be set out shortly.
Finance Secretary Kate Forbes told MSPs on Thursday that some of the cash was being “repurposed” from the health portfolio, “to directly support public health compliance via business restrictions and self-isolation”.
Scottish ministers have also called on the UK government to ramp up financial backing for businesses, with First Minister Nicola Sturgeon saying “a targeted furlough scheme” should be introduced for the most-affected sectors.