The statement came in response to Crimea's parliament voting to join Russia and setting a referendum for Sunday on the decision in a dramatic escalation of the crisis over the Ukrainian Black Sea peninsula.
The G7 leaders said they would not recognise the outcome of the referendum, which they said "would have no legal effect", calling it a "deeply flawed process, which would have no moral force" because of the presence of Russian troops in the region.
Russian efforts to annex Crimea would violate five different bilateral and international agreements, including the UN charter, the G7 leaders said in a statement released by the White House.
It also "could have grave implications for the legal order that protects the unity and sovereignty of all states," they said.
The G7 statement added: "Should the Russian Federation take such a step, we will take further action, individually and collectively."
The leaders called on Russia to withdraw its forces in Crimea, begin talks with Ukraine and allow international observers into the region.
President Barack Obama met Ukrainian Prime Minister Arseny Yatseniuk at the White House yesterday. The US has said it is prepared to sanction Russia over the Crimea issue and EU member have also agreed to sanctions.
The G7 group includes Canada, France, Germany, Italy, Japan, the UK, the US, the European Council and the European Commission. In 1998 it added Russia to form the G8.
Russia is scheduled to hold the next G8 summit in Sochi in June, but the leaders of the G7 have suspended planning for that meeting because of the crisis in Ukraine.
The G7 leaders said: "We also remind the Russian Federation of our decision to suspend participation in any activities related to preparation of a G8 Sochi meeting until it changes course."