The rule applies to all travelers visiting the UK or returning from vacation, regardless of their vaccination status, and will go into effect from 4 a.m. on Tuesday 7 December.
The tests must be taken a maximum of 48 hours before the departure time.
Sajid Javid said it was because of a “growing number of travel-related cases”.
Follow COVID updates live
Nigeria is also added to the travel red list – joining several southern African countries that were added after the Variante Omicron was first detected at the end of last month.
This means that only British citizens and residents will be able to enter the country from Nigeria, and they will have to pay to stay in a quarantine hotel for 10 days.
The change comes from 4 a.m. on Monday, with Mr Javid saying Nigeria “is second behind South Africa in Omicron-related cases.”
Mr Javid acknowledged that the measures are “extremely unfortunate” for people who already had travel plans, but insisted they would be “temporary”.
“We want to remove them as soon as possible,” he added.