People living in level three or level four local authorities will be breaking the law from Friday if they make non-essential journeys outside their own council area.
First Minister Nicola Sturgeon told MSPs police will have the powers to enforce the new restrictions.
The legislation was announced as 11 of Scotland’s 32 local authorities prepare to go into level four lockdown.
Police Scotland said officers will only use the new powers as a “last resort”.
Since last month the guidance has been that people should not leave their own area unless it is for essential purposes, such as work or caring for a vulnerable person.
But from Friday, the first minister confirmed that advice would become law:
A further nine local authorities are in level three, in addition to the 11 council areas under the highest level of restrictions.
Ms Sturgeon said: “I know this is difficult, but it is essential. Broadly comparable restrictions have been or continue to be in force in England and Wales.
“And if we are to maintain a targeted approach and allow low prevalence areas to live with fewer restrictions, I cannot stress enough how important it is that we all abide by these rules.”
Asked by Highlands and Islands MSP Donald Cameron how the travel ban will work, Ms Sturgeon replied: “The police will enforce the regulations in the way that the police have enforced all the regulations that have been in place, in other words it will be a last resort.”
She added that she expects people will be punished only where there is a “clear and flagrant breach”.
Since March police have made more than 300 arrests and issued over 3,600 fixed penalty notices to people who have breached Covid restrictions.
Fines start at £30, doubling to £60 if they are not paid within 28 days. Repeat offenders can face fines of up to £960.
Assistant Chief Constable Alan Speirs encouraged people to take personal responsibility and “do the right thing” to prevent the virus from spreading.
He added: “We will use enforcement as a last resort where there is a clear breach of the legislation.
“The Chief Constable has said publicly on numerous occasions that we will not be routinely stopping vehicles or setting up road blocks, and that will not change as a result of travel restrictions now being in law.
“However, officers may in the course of their duties come across people who are travelling from one local authority area to another. In areas where travel restrictions apply, officers will continue to use common sense, discretion and excellent judgement that they have applied since the crisis began.”
The Scottish government said updated travel guidance would be published ahead of the regulations being introduced at 18:00 on Friday.
A number of exceptions are currently listed on the Scottish government website under the following appeal: “Please do not see these as loopholes. It is important for everyone’s safety that we all minimise such travel as much as possible.”
They include travel for healthcare, social care, childcare and other essential services – including recycling – but only if they are not available in your local area.
Journeys to school, college or university are permitted where teaching is not provided remotely.
Travel for work, or to provide voluntary or charitable services, falls into this category but “only where that cannot be done from your home”.
Also included is travel for essential shopping “only where it is not possible in your local authority area”.
So too is travel for shared parenting or between the two parts of an extended household.
Other exceptions include travel to meet a legal obligation, to move house, for essential animal welfare reasons and for “life events” such as weddings or funerals.
People are permitted to transit through level three or four areas if the journey begins and ends outside such areas.