Japan's foreign minister on Wednesday urged Beijing to "play a responsible role" over Russia's invasion of Ukraine in his first talks with his Chinese counterpart in six months.

Japan has joined Western allies in implementing tough sanctions against Russia over the Ukraine crisis, while Beijing has declined to condemn Moscow's invasion.

Foreign Minister Yoshimasa Hayashi told his Chinese counterpart Wang Yi that Russia's invasion "is a clear violation of the UN Charter and other international laws," Japan's foreign ministry said in a statement.

He "urged China to play a responsible role in maintaining international peace and security," it added.

The talks were the first between the two foreign ministers since November, according to Japan, coming as concerns ramp up about geopolitical tensions.

China and Russia are perceived to be stepping up coordination, with Beijing pointedly refusing to join the outcry over Moscow's invasion, though it has pledged not to circumvent sanctions over the war.

The talks come as US President Joe Biden is set to arrive in Japan this week after a stop in Seoul.

Japan urged China to play a 'responsible' role over Moscow's invasion of Ukraine
Japan urged China to play a 'responsible' role over Moscow's invasion of Ukraine Ministry of Foreign Affairs of Japan via AFP / Handout

He will hold bilateral talks with Prime Minister Fumio Kishida and attend a meeting of the Quad grouping that includes Australia and India.

The grouping has been seen as intended to pressure China as it builds its economic and military weight in the region.

China's foreign ministry hit back after the talks on Wednesday, saying it hopes Japan "will learn from the lessons of history, focus on regional peace and stability, and act cautiously".

"Bilateral cooperation between Japan and the United States should not provoke confrontation between camps, let alone harm China's sovereignty, security and development interests," it said in a statement.

Japan views Beijing's growing military assertiveness with concern, and Hayashi raised issues including islands disputed between the countries and the situation in the East and South China Seas in talks with Wang.

But China is also Tokyo's largest trading partner and Japan is keen to avoid being drawn into disputes between Beijing and Washington.

Hayashi said both China and Japan "should say what needs to be said and engage in dialogue", warning that bilateral ties "face various difficulties and that public opinion in Japan is extremely severe towards China."