People arriving by plane, train or boat, including UK nationals, will have to take a test up to 72 hours before leaving the country they are in.
Transport Secretary Grant Shapps said travellers "can't board... without having that negative test".
But even with a negative test, arrivals from countries not on the travel corridor list must still quarantine.
Under the new rules - which are expected to come in from next week - anyone who arrives in the UK and has not got proof of a negative test could face an immediate £500 fine.
But there will be exemptions for:
children under 11
those travelling from countries without the infrastructure to deliver tests - although details of those have not been released yet
arrivals from the Common Travel Area with Ireland.
All passengers arriving from countries not on the government's travel corridor list must still self-isolate for 10 days, regardless of their test result.
Mr Shapps told LBC the testing rule will come into force "likely on Wednesday or Thursday next week", and details of how to get tests abroad will be published on the gov.uk website.
The rule will be UK-wide, although Northern Ireland said it had only "agreed in principle" and was working to solve any policy and operational issues.
Non-essential travel abroad is not currently allowed in the UK - but British Airways is still selling Caribbean holidays to depart from Sunday onwards.
Other firms including Tui, Jet2 and Virgin Holidays have already cancelled operations until mid-February. BA said customers due to depart would be offered refunds - but it was still selling breaks because business people use their holiday packages to aid their travel arrangements.