Revellers were not able to ring in the New Year in the usual way because of the coronavirus pandemic, with people instead told to stay at home.
But the 10-minute show over the Thames was aired on the BBC at midnight.
Edinburgh's traditional Hogmanay street party was cancelled, with videos of a drone display released instead.
However crowds of several hundred people gathered at Edinburgh Castle to see in the new year - despite warnings from police and the government to stay away.
People sang and danced before eventually dispersing when several police vans and cars pulled on to the castle esplanade.
Much of the UK saw in the new year while under lockdown rules, with about 44 million people in England - or 78% of the population - in tier four, the top level of restrictions.
Mainland Scotland, Northern Ireland and Wales are also under lockdown.
On New Year's Eve, Health Secretary Matt Hancock called on people to take "personal responsibility" and stay at home to avoid spreading Covid-19.
London's televised display began with a poem which addressed the pandemic: "In the year of 2020 a new virus came our way; We knew what must be done and so to help we hid away."
Light projections lit up the sky over the O2 Arena, including the NHS logo in a heart accompanied by a child's voice saying: "Thank you NHS heroes".
There was also a nod to one of the 2020 phenomena - working from home - with a mute logo backed by a voiceover saying "You're on mute".
The display also featured a recognition of the Black Lives Matter movement, as well as a call from Sir David Attenborough about the need for action on climate change.
Mayor of London Sadiq Khan said he was proud of the show, which he said "paid tribute to our NHS heroes and the way that Londoners continue to stand together".
"We showed how our capital and the UK have made huge sacrifices to support one another through these difficult times, and how they will continue to do so as the vaccine is rolled out."
Usually, around 100,000 people pack into the streets around Victoria Embankment to watch the New Year's Eve fireworks.
And in Edinburgh, the Hogmanay street party attracts about 100,000 visitors with live performances in Princes Street Gardens. While there were no midnight fireworks at Edinburgh Castle this year, a display was held at the Wallace Monument in Stirling.
A series of videos showing a swarm of 150 lit-up drones over the Scottish Highlands and Edinburgh were released. Organisers said it was the largest drone show ever produced in the UK.
Earlier, London's Metropolitan Police issued a warning to potential revellers in London to "celebrate the new year in the comfort of their own homes, not the homes of family and friends".
Commander Paul Brogden, who is leading this year's operation, said fines would be issued where necessary to any rule-breakers.
In Brighton, people were told not to attend a New Year's Eve party on the seafront, after a group called Protest Everywhere advertised a "freedom protest street party".
The Welsh Ambulance Service warned "no party is worth the risk", with the health service under "extreme pressure".