The £38m yacht, named Phi, is owned by an unnamed Russian businessman.
Transport Secretary Grant Shapps said the individual was not currently sanctioned but had "close connections" to Russian President Vladimir Putin.
The UK has introduced a raft of sanctions against Russian individuals and businesses following the country's invasion of Ukraine.
The 58.5m (192ft) Phi was first identified as being potentially Russian-owned on 13 March but its ownership is "deliberately well hidden", the government said.
It added that the company the ship is registered to is based in the Caribbean islands of St Kitts and Nevis but it carried Maltese flags to hide its origins.
The Department for Transport (DfT) would not comment on why it was not naming the individual who owns the yacht.
Transport secretary Mr Shapps said the move was "a clear and stark warning to Putin and his cronies".
"The ship won't be going anywhere for the time being," he said. "People who have benefitted from [Mr Putin's] regime cannot benefit from sailing around London and the UK in ships like this."
On its website, the ship's builder Royal Huisman describes Phi - which is named after the mathematical concept also known as the Golden Ratio - as "magnificently sensuous".
The bright blue yacht features what the builders call an "infinite wine cellar", as well as a fresh-water swimming pool and penthouse apartment on the upper deck.
The ship, which was built in the Netherlands, made her maiden voyage last year.
UK officials boarded Phi in Canary Wharf, east London on Tuesday. The vessel was in the capital for a superyacht awards ceremony and was due to depart at 12:00.
The yacht was detained under the Russia (Sanctions) (EU Exit) Regulations 2019. The regulations say the secretary of state "may give a 'movement direction' to any 'ship owned, controlled, chartered or operated by persons connected with Russia'," according to Benjamin Maltby, partner at international law firm Keystone Law.
Yachts count as ships and a movement direction could include detaining the ship, he said.
However, he said the decision to detain a ship could be challenged under human rights law, which gives people the right to "peaceful enjoyment" of their possessions.
A successful challenge could see the owner demanding compensation, starting at the cost of chartering a similar yacht, which would be around £250,000 a week, Mr Maltby said.
"If the secretary of state has got this wrong, it could be a very expensive mistake," he added.
Ben King, BBC business reporter
Before the war, a superyacht, a megayacht, even a gigayacht was high on the shopping list for super-rich Russians.
Helicopter launch pads, mini-subs, swimming pools and missile defences all added to the impression of dazzling wealth and power.
But those boats are not just toys, or status symbols, but floating stores of value.
A number of Russians have sailed their ships out of EU waters, before sanctions could bite.
For instance, Roman Abramovich's two immense yachts, Eclipse and Solaris are in Turkey - safe from the sanctions imposed on him in the UK and EU.
While many of these boats have a price tag far in excess of £100m, they're relatively small compared to the total value of Russian sanctions.
But detaining them represents a symbolic blow against the ultra-rich lifestyle that Russian oligarchs once enjoyed.
It now presents European authorities with a challenge: What do you do with a confiscated superyacht that needs millions of pounds'-worth of maintenance every year to keep it seaworthy?
The DfT worked with the National Crime Agency and Border Force Maritime Investigation Bureau to identify and detain the vessel.
The department, alongside law enforcement agencies, is also looking at a number of other vessels.
The UK, US and EU have all said they will target superyachts linked to sanctioned Russians, and at least eight have been seized so far - by authorities in France, Italy and Spain.
For example, at the beginning of March French authorities seized a yacht owned by Igor Sechin, boss of Russian state energy company Rosneft.
More yachts remain on the move or moored in places that are currently beyond the reach of sanctions, including the Maldives.