China has been incensed by recent moves by US President Donald Trump's administration to increase support for self-ruled and democratic Taiwan, including US Navy sailings through the Taiwan Strait that separates the island from mainland China.
Speaking at the Shangri-La Dialogue in Singapore, Asia's premier defence summit, Wei said China would "fight to the end" if anyone tried to interfere in its relationship with Taiwan, which Beijing considers a sacred territory to be taken by force if necessary.
Wei, the first Chinese defence minister to speak at the Shangri-La Dialogue since 2011, said Beijing's military operations in Asia were purely aimed at self-defence, but it would not hesitate to counter an attack on its interests.
"China will not attack unless we are attacked," Wei said, cautioning that there would be dire consequences to any clash between China and the United States.
"The two sides realise that conflict, or a war between them, would bring disaster to both countries and the world."
The United States, like most countries, has no formal ties with Taiwan, but is its strongest backer and main source of weapons.
On Saturday, acting US Defence Secretary Patrick Shanahan told the Shangri-La meeting that the United States would no longer "tiptoe" around Chinese behaviour in Asia.
While Shanahan's speech was critical of China, his tone was often conciliatory. Wei took a more combative approach.
"No attempts to split China will succeed. Any interference in the Taiwan question is doomed to failure," said Wei, dressed in his uniform of a general in the People's Liberation Army.
"If anyone dares to split Taiwan from China, the Chinese military has no choice but to fight at all costs ... The US is indivisible, and so is China. China must be, and will be, reunified."
China-US ties have become increasingly strained due to a bitter trade war, US support for Taiwan and China's muscular military posture in the South China Sea, where the United States also conducts freedom-of-navigation patrols.
TIANANMEN ANNIVERSARY
Taiwan is gearing up for presidential elections in January, and Taiwan President Tsai Ing-wen has repeatedly accused Beijing of seeking to undermine Taiwan's democracy and has vowed to defend the island and its freedoms.
Wei, in a clear reference to the United States, also said: "Some countries from outside the region come to the South China Sea to flex muscles in the name of freedom of navigation."
This week will mark 30 years since a bloody Chinese military crackdown on protesters around Beijing's Tiananmen Square, refocusing scrutiny on China's approach to security threats.
Taking questions from the floor, Wei defended the government's handling of the Tiananmen "incident", a rare official acknowledgement of the events of June 4, 1989; references to it are heavily censored in China.
"The government was decisive in stopping the turbulence," Wei said of the Tiananmen Square crackdown.
"Due to this, China has enjoyed stability, and if you visit China you can understand that part of history."
On the ongoing trade war, which has shaken financial markets around the world, Wei said China would "fight to the end" if the United States wanted a fight. But if Washington wanted to talk, "we will keep the door open".
Trade tensions escalated sharply last month after Trump's administration accused China of having "reneged" on its previous promises to make structural changes to its economic practices.
Washington later slapped additional tariffs of up to 25% on $200 billion of Chinese goods, prompting Beijing to retaliate.
Speaking at a hastily arranged news conference in Beijing, Chinese Vice Commerce Minister Wang Shouwen said it was irresponsible of the United States to accuse China of backtracking.
"If the US side wants to use extreme pressure, to escalate the trade friction, to force China to submit and make concessions, this is absolutely impossible," said Wang, who has been part of China's trade negotiating team.