President Xi Jinping said during his visit to Germany that Japanese atrocities during the second world war were still "fresh in the memory" in China and that the nation needed to build its defences to safeguard against aggression.
In a speech in Berlin, Xi also reiterated that China's rise posed no threat to the world and that it was committed to creating friendly partnerships with its neighbours.
His comments came after an earlier speech in France during the president's European tour in which Xi compared China to an "awakened lion" which he said was "peaceful, pleasant and civilised".
In his speech in the German capital, Xi also said China was no Mephisto, a fictional demon character in German literature.
"Some view China through coloured glasses and believe it will inevitably become a threat and even portray China as being the terrifying Mephisto who will someday suck the soul of the world," he said.
These opinions, he said, highlighted deep prejudices against China.
Xi mentioned Japanese aggression twice in his speech and said China understood the importance of peace.
"The war of aggression committed by Japan militarism alone inflicted over 35 million Chinese military and civilian casualties.
"These atrocities are still fresh in our memory … China needs peace as much as human beings need air and plants need sunshine," he told a forum attended by politicians and business representatives.
In a question-and-answer session at the forum, Xi appeared willing to take on some sensitive questions, including China's territorial disputes in the South China Sea with neighbours and the nation's defence budget.
"It is purely normal and consistent with China's need to defend itself as a large country in the world," he said of China's defence spending.
"On the issue of the South China Sea, we will not provoke trouble ourselves. But when it comes to our sovereignty and territorial integrity we will firmly safeguard our interests."
Business ties took centre stage at Xi's meeting with German Chancellor Angela Merkel. The two leaders oversaw the signing of deals including agreements by carmakers Daimler and BMW to deepen ties with their Chinese partners.
A deal was also signed between the countries' central banks that will allow yuan-denominated payments to be cleared and settled in Germany's financial centre, Frankfurt.
Xi also called for a "quantum leap" to boost economic ties with Germany.
Germany is China's largest European trading partner, while China is Germany's biggest export market outside Europe after the United States.