Chinese President Xi Jinping urged Japanese Prime Minister Shinzo Abe on Saturday to put aside "distractions" that have strained bilateral ties and warned that China was unwilling to compromise on Taiwan, state news agency Xinhua said.
Relations have been complicated for decades by the legacy of Japan's wartime aggression.
Self-ruled Taiwan, which is claimed by China and was governed by Japan from 1895-1945, is another sensitive issue, and a maritime territorial dispute over small islands in the East China Sea has deepened mutual suspicion in recent years.
Beijing complained to Tokyo in March after a Japanese minister visited Taiwan, and China has also told Japan not to get involved in the dispute over the South China Sea.
Meeting on the sidelines of the G20 summit in the German city of Hamburg, Xi told Abe the countries were important neighbours, and said the healthy development of relations was of importance to the rest of the world, Xinhua said.
Xi urged Japan to learn from history so as to have a "better future" in its ties with China, the report added.