Foreign ministry spokesman Geng Shuang said China made "representation" to Singapore after nine combat vehicles were stopped by Hong Kong customs en route from Taiwan on Wednesday. Geng called on Singapore to abide by Hong Kong laws and the "one China" principle.
"The Chinese government resolutely opposes nations with diplomatic ties with China to have any form of official contacts with Taiwan, including military exchanges and cooperation," he said. "We demand Singapore strictly abide by the one-China principle."
Observers said the protest was a warning to both Singapore and Taipei, which have seen their relationships with Beijing deteriorate.
Beijing accuses Singapore of being intractable over the South China Sea disputes.
It also cut off official communication with Taiwan after Tsai Ing-wen from the independence-leaning Democratic Progressive Party came into power in May.
More from the South China Morning Post
China has always kept mum on Singapore's defence ties with Taipei, so why is it complaining now?
U.S. to expand military presence in Asia-Pacific but Trump 'unlikely to chart dramatic new course'
Hong Kong waiter halves list of lawmakers he wants disqualified over alleged faulty oaths
APL, the company hired by the Singapore Armed Forces to transport the military vehicles, said in a statement it was cooperating with Hong Kong authorities and was working with stakeholders.
Military ties between Singapore and Taiwan go back more than four decades. In 1974, Singapore and Taipei initiated "Project Starlight", which gave Singaporean troops much-needed physical room to carry out exercises on the self-ruled island.
Euan Graham, director of the international security programme at the Lowy Institute in Sydney, said the warning by Beijing was aimed at "killing two birds with one stone".
"On one hand, it is a punishment intended to deter Singapore from being outspoken on the South China Sea," Graham said. "On the other hand, it is aimed at further isolating Taiwan's new DPP-led government."
Li Jie, a retired Chinese naval colonel, said Singapore's approach to the South China Sea row – which Beijing views as aligned with the United States' interests – and Tsai's rise to power had affected China's national interests.
"It is also a warning to other countries not to get too close to a pro-independence Taiwan administration," Li said. "China will not compromise its core interests when it comes to the matter of principles."
Wang Hanling, a maritime law specialist at the Chinese Academy of Social Sciences, said Singapore's ties with Taipei were less of a concern to Beijing than Singapore's ties with the US.
But Taiwanese and regional security observers said Taiwan would continue military exchanges with other nations, and Singapore might become more eager to establish military ties with other countries.
Alexander Huang, former vice-minister of Taiwan's Mainland Affairs Council, said military ties between Taiwan and Singapore did not have a negative impact on regional security.
"If both sides want to continue such cooperation, I don't think it would be affected by any third party," he said.