The new measure was announced as UK Transport Secretary Grant Shapps confirmed a similar move in England from next week for passengers arriving by boat, train or plane.
In Scotland, the Government said the new public health requirement would be “introduced as soon as practically possible”.
People arriving into Scotland will have to take the pre-departure test (PDT) up to 72 hours before leaving the country they are in. Those coming from countries not on the quarantine exemption list will still be required to self-isolate for 10 days on arrival.
Non-essential travel to or from Scotland is currently illegal and this will not change.
While many international flights to Scotland have been suspended because of the pandemic, KLM planes still arrive several times a day in Glasgow and Edinburgh from the Dutch airline's global hub in Amsterdam, and Emirates is still flying to Glasgow several times a week from its Dubai hub which connects with destinations in Asia and Australia/New Zealand.
Transport Secretary Michael Matheson said: “Travel into or out of Scotland is currently illegal and that will remain the case while we work to suppress the new strain of COVID-19.
“The Scottish Government has been consistently clear about the risks associated with international travel and the importance of public health measures in helping to stop the spread of coronavirus. That is why we have been in regular dialogue with the UK Government and the other devolved administrations about what further measures can be put in place, including the introduction of pre-departure testing (PDT).
“The requirement for pre-departure testing will add to our suite of public health measures as we seek to help drive down transmission of the virus to safeguard health, protect the NHS and save lives.
“It is important to emphasise that this additional measure does not remove the requirement for all passengers arriving from countries not on the quarantine exemption list to self-isolate for ten days, even with a negative test. Likewise, all passengers will continue to have to complete a Passenger Locator Form and, of course, they will be subject to national lockdown restrictions, which currently bar people from leaving their home or other fixed address without a reasonable excuse for doing so.
“As the UK Government has made clear, there are still some outstanding issues to address and it is important that we consider the implications, but we are keen to implement this as soon as it is possible.”
In England, the Westminster government has said failure to comply with the new regulations will lead to an immediate £500 fine.
There will be a limited number of exemptions, including hauliers, children under 11, crews and for those travelling from countries without the infrastructure available to deliver tests.
Arrivals from the Common Travel Area with Ireland will also be exempt.
The move follows the decision to suspend all direct travel from South Africa following the emergence there of a new strain of coronavirus thought potentially to be even more virulent than the mutant variant which has led cases to surge in the UK.