The tablet - molnupiravir - will be given twice a day to vulnerable patients recently diagnosed with the disease.
In clinical trials the pill, originally developed to treat flu, cut the risk of hospitalisation or death by about half.
Health Secretary Sajid Javid said the treatment was a "gamechanger" for the most frail and immunosuppressed.
In a statement he said: "Today is a historic day for our country, as the UK is now the first country in the world to approve an antiviral that can be taken at home for Covid."
Molnupiravir, developed by the US drug companies Merck, Sharp and Dohme (MSD) and Ridgeback Biotherapeutics, is the first antiviral medication for Covid which can be taken as a pill rather than injected or given intravenously.
The UK has agreed to purchase 480,000 courses with the first deliveries expected in November.
Initially it will be given to both vaccinated and unvaccinated patients through a national study, with extra data on its effectiveness collected before any decision to order more.
The drug needs to be given within five days of symptoms developing to be most effective.
It's not immediately clear how it will be distributed so quickly by the NHS. It's thought some care homes may be offered supplies while other elderly or vulnerable patients may be prescribed it by their GP after testing positive for Covid.
The new treatment targets an enzyme that the virus uses to make copies of itself, introducing errors into its genetic code. That should prevent it from multiplying, so keeping virus levels low in the body and reducing the severity of the disease.
Merck said that approach should make the treatment equally effective against new variants of the virus as it evolves in the future.
The UK regulator, the MHRA, said the tablet had been authorised for use in people who have mild to moderate Covid and at least one risk factor for developing severe illness such as obesity, old age, diabetes or heart disease.
The organisation's chief executive, June Raine, described it as "another therapeutic to add to our armoury against Covid-19".
"It is the world's first approved antiviral for this disease that can be taken by mouth rather than administered intravenously," she said.
"This is important, because it means it can be administered outside of a hospital setting, before Covid-19 has progressed to a severe stage."
England's deputy chief medical officer, Prof Jonathan Van-Tam, warned on Wednesday of some "hard months to come" in the pandemic.
He said that while Covid cases appeared to have stabilised, deaths were rising and there were signs infections were starting to "penetrate" older age groups.
The UK recorded 41,242 Covid cases on Thursday and 214 deaths within 28 days of a positive test.
Earlier clinical trials of molnupiravir on 775 patients who had recently caught Covid found:
* 7.3% of those given the drug were hospitalised
* that compares with 14.1% of patients who were given a placebo or dummy pill
* there were no deaths in the molnupiravir group, but eight patients who were given a placebo in the trial later died of Covid
The results were published in a press release and have not yet been peer-reviewed.
But data suggest molnupiravir needs to be taken soon after symptoms develop to have an effect. An earlier study in patients who had already been hospitalised with severe Covid was halted after disappointing results.
In its approval document, the MHRA recommends the drug is used "as soon as possible" following a positive Covid test and within five days of symptoms onset.
Prof Penny Ward, from King's College London, who was not involved in the study, said: "If these outcomes are replicated in the UK population, then the number of cases requiring hospital admission could be halved and the number of deaths greatly reduced.
"It seems likely that it will be restricted for use by those at highest risk of disease complications - for example older adults with heart, lung or kidney disease, diabetes or cancer."
The UK government has not disclosed how much its initial contract for 480,000 courses of molnupiravir is worth. But US authorities recently made an advance purchase of 1.7 million courses at a cost of roughly $1.2 billion, or $700 (£513) for each patient.
Other countries including Australia, Singapore and South Korea have also made purchase agreements.
Merck is the first company to report trial results of a pill to treat Covid, but other companies are working on similar treatments.
Its US rival Pfizer has started trials of two different antiviral tablets, while Swiss company Roche is working on a similar medication.