Russia faces massive consequences and severe costs if President Vladimir Putin attacks Ukraine, the Group of Seven warned in a statement on Sunday.
US intelligence assesses that Russia could be planning a multi-front offensive on Ukraine as early as next year, involving up to 175,000 troops.
The Kremlin denies it plans to invade and says the West is gripped by Russophobia. Moscow says the expansion of NATO threatens Russia and has contravened assurances given to it as the Soviet Union collapsed in 1991.
At a meeting in the northern English city of Liverpool, the G7 delegates said they were united in their condemnation of Russia's military build-up near Ukraine and they called on Moscow to de-escalate.
"Russia should be in no doubt that further military aggression against Ukraine would have massive consequences and severe cost in response," said the statement, which confirmed a draft version previously reported by Reuters.
"We reaffirm our unwavering commitment to Ukraine's sovereignty and territorial integrity, as well as the right of any sovereign state to determine its own future."
A statement released by the Russian Embassy in London on Saturday evening, before the joint G7 document was reported, said that Britain's frequent use of the phrase "Russian aggression" during the Liverpool meeting was misleading and designed to create a cause for the G7 to rally round.
"Russia has made numerous offers to NATO on ways to decrease tensions. The G7 forum could be an opportunity to discuss them, but so far we hear nothing but aggressive slogans," the embassy statement said.
For Moscow, the growing NATO embrace of a neighbouring former Soviet republic - and what it sees as the nightmare possibility of alliance missiles in Ukraine targeted against Russia - is a "red line" it will not allow to be crossed.
Putin has demanded legally binding security guarantees that NATO will not expand further east or place its weapons close to Russian territory; Washington has repeatedly said no country can veto Ukraine's NATO hopes.
In 2014, Russia seized the Black Sea peninsula of Crimea from Ukraine, prompting the West to impose sanctions on Russia.
The Kremlin on Sunday said that Putin told US President Joe Biden that Russian troops posed no threat and that Moscow was being demonised for moving troops around its own territory. Putin and Biden have agreed to hold more talks, Moscow said.
Kremlin spokesman Dmitry Peskov said there were very serious conceptual differences between Russia and the US on Moscow's "red lines".
The G7 comprises Britain, France, Germany, Italy, Japan, Canada and the United States, as well as a representative from the European Union.
"We call on Russia to de-escalate, pursue diplomatic channels and abide by its international commitments on transparency of military activities," the G7 said.
"We reconfirm our support for the efforts of France and Germany in the Normandy Format to achieve full implementation of the Minsk Agreements in order to resolve the conflict in eastern Ukraine."