Wei spoke on the last day of the Shangri-La Dialogue, a regional security forum in Singapore that was also attended by US Defence Secretary Lloyd Austin.
In their exchanges, Wei and Austin played out in miniature the tensions between Beijing and Washington over disputes across Asia, particularly over Taiwan, the New York Times reports.
In his speech to diplomats, defence officials and security experts at a five-star hotel, Wei said that China was sincerely doing everything it could to bring about peaceful unification with Taiwan, the self-governed island that Beijing considers its own.
But, he said, "no one should ever underestimate the resolve and capabilities of China's armed forces" to defend its sovereignty claims.
"For the sake of unification, the United States fought the war between North and South," Wei said.
"China is most unwilling to go through a civil war like that but will resolutely smash any schemes for Taiwan independence. If anyone dares to split off Taiwan, we will not hesitate to fight, will not flinch from the cost, and will fight to the very end."