Malaysian Prime Minister Najib Razak on Wednesday (2 November) asked former colonial powers to not "lecture" nations they once exploited.
Najib, who is on a six-day visit to China, said in an opinion piece in the state-run China Daily that bigger countries with greater powers must treat smaller countries "fairly".
His remarks are seen as an attack on the west as he too leans towards China like the Philippines, whose President Rodrigo Duterte announced Manila's "separation" from the US.
The shift by Manila and Kuala Lumpur is viewed as part of Beijing's strategy to counter the Pentagon's influence in the region, Reuters reported.
The US has been supporting the Philippines in its claim in the South China Sea, where Malaysia too has overlapping claims and has locked horns with China. But as he leans towards Beijing, the Malaysian prime minister said he would sort out the territorial dispute with China through dialogue.
"The relationship between China and Malaysia is based on mutual trust and respect ... We firmly believe that overlapping territorial and maritime disputes should be managed calmly and rationally through dialogue, in accordance with the rule of law and peaceful negotiations," Najib wrote.
"Malaysia and China are united in agreeing on the need to defend the sovereignty of the nation state and in the belief that the individual histories, values and governance systems of different countries must be respected," he added.
Najib emphasised that it is important for "global institutions" to reflect the views of countries which were not given a say in the "legal and security infrastructure that was set up by the victors of the Second World War".
He also announced Malaysia was taking new steps for military cooperation with China.
"Nearly two years ago, we undertook our first-ever bilateral military exercise, and last year our first joint live-troop exercise."
According to Reuters, Malaysia has agreed to buy four Chinese naval vessels and signed 14 agreements worth $34.25bn after a meeting between Chinese Premier Li Keqiang and the Malaysian prime minister on Tuesday (1 November).