The Duke and Duchess of Sussex met the Queen on Thursday after flying into the UK, a spokesperson for the couple confirmed to the BBC.
The couple stopped at Windsor on their way to The Hague, in the Netherlands, for the Invictus Games.
Prince Harry was last reported to be in the UK in July, while Meghan is not thought to have been in the country since 2020.
The Sussexes stepped down as senior royals in January 2020.
Their trip to the UK comes after Prince Harry was absent from a memorial service for his grandfather, the Duke of Edinburgh, in London last month.
The Queen is not expected to attend this year's Easter morning church service having already pulled out of the Maundy Service on Thursday – for the first time since 1970.
The 95-year-old monarch has mobility problems and has pulled out of several events recently, including the annual Commonwealth Service.
The duchess last appeared in the UK at the Commonwealth Day Service in March 2020 while the duke was in the UK to unveil a statue of his mother, Diana, Princess of Wales, in July last year.
The couple are on their way to the Invictus Games in the Netherlands, which will take place from 16 to 22 April.
A film crew is expected to be joining the couple at the games as part of filming for a Netflix series called Heart Of Invictus.
Prince Harry founded the games to aid the rehabilitation of injured or sick military personnel and veterans from across the globe.
Prince Harry and Meghan remain big box office.
They might no longer be "working royals", but their touchdown in the UK made instant headlines.
Their unpublicised visit to the Queen had a touch of Hollywood drama.
It will delight their supporters. But their challenge will be to build bridges with the parts of the public who have become more sceptical.
Why are they able to travel to the Netherlands, via Windsor, when they didn't attend Prince Philip's memorial in Westminster Abbey?
Will the Californian lifestyle seem out of touch with a public now worrying about gas bills?
After the disruption of two years of the pandemic, many families will be travelling this bank holiday to try to make re-connections and get back in touch.
Expect to see and hear more from Harry and Meghan over the bank holiday weekend ahead.
Joe Little, managing editor of Majesty Magazine, described the visit as "a very welcome if long overdue move" on the part of Harry and Meghan.
The couple also saw Prince Charles while they were at Windsor Castle, the Sun reported.
The visit comes as Prince Harry is bringing a court challenge against the government's decision to refuse police security during his visits from the US.
His lawyers previously said that the UK would "always be his home" and it "goes without saying that he does want to come back to see family and friends".
Since the couple moved to the US, the duchess gave an emotional interview in which she said life in the Royal Family had been so difficult she "didn't want to be alive any more" and the pair's daughter Lillibet, named after the Queen's family nickname, was born.
But while it may have been some time since the duchess has seen the Queen in person, during an appearance on The Late Late Show in 2021 Prince Harry revealed that the monarch had used Zoom to video call the family.
Royal family tree: Charles III and the order of succession
Queen not expected to attend Easter service
Parts of Harry case to be kept private, court says
Prince Harry launches claim against Mail group
UK is still my home, says Harry in security row
Harry files legal claim over UK police protection
Harry and Meghan release first photo of Lilibet
12 claims from Meghan and Harry's Oprah interview
Several people hurt in shooting near LA – reports
Six more classified documents seized at Biden home
Canada settles $2.8bn residential schools lawsuit
How silence and fear protected a Mafia boss for decades
Hiding from Putin's call-up by living off the grid
Chinese families reunite for a bittersweet New Year
Is this the UK's most important fireball? Video
Japan was the future but it's stuck in the past
Ardern burnout shows toll of stress on world leaders
How Ukraine war led to a new Indian beer in Poland
How I overcame my addiction. Video
How a Delhi district stopped the ground from sinking
The simple error that 16% of us make
Gen Z's latest surprising obsession
A return to old-school Canadian glamour
© 2023 BBC. The BBC is not responsible for the content of external sites. Read about our approach to external linking.