It is rare for Xi to speak so directly about the trade war, and his comments come two days after US President Donald Trump complained that Beijing had not made sufficient concessions so far, making him reluctant to conclude a bargain.
The world's two biggest economies have been locked in a bruising trade conflict for more than a year, hitting each other with volleys of tariffs on hundreds of billions of dollars worth of goods, Presstv Reported.
"As we always said we don't want to start the trade war but we are not afraid," Xi told former US officials and other foreign dignitaries at a meeting at Beijing's Great Hall of the People.
"When necessary we will fight back but we have been working actively to try not to have a trade war," he told the group, which included former US secretary of state Henry Kissinger, former US treasury secretary Henry Paulson and Trump's former economic adviser Gary Cohn.
Trump on October 11 announced a "phase one" deal resolving important US grievances about Chinese trade and currency practices.
But the two sides have yet to ink the deal.
The Chinese commerce ministry said top trade negotiators had "constructive" discussions on the phone on Saturday.
China has insisted on a rollback of existing tariffs, which Trump said he has not agreed to. American officials want large purchases of US farm exports.
'China's not going to budge'
US Congress approval this week of legislation supporting pro-democracy protesters in Hong Kong has also cast a shadow on the negotiations.
"We want to work for a phase-one agreement on the basis of mutual respect and equality," Xi told the foreign visitors, who were in town for the Bloomberg New Economy Forum.
The Chinese leader said the trade talks "may affect the future prospects of the world economy" and China holds a "positive attitude".
Diana Choyleva, chief economist at Enodo Economics, said Xi's comments do not mean that Beijing is about to go on the offensive, but it shows that it is "not going to budge."
"The negotiation style and lack of trust that Trump has created... has made him (Xi)... very determined that there is no point to really give up much," Choyleva told AFP at the New Economy Forum.
Xi renewed China's pledge to further reform and open up its economy, but he warned it has been "very cautious and rigorous" in doing so.
"We cannot afford any fundamental or drastic mistake. If a giant ship like China capsizes it cannot be turned over," he said.
The 'Chinese dream'
Trump launched his trade war in March 2018, demanding that China end practices widely seen as unfair -- such as forced technology transfers from US firms, and massive subsidies given to Chinese firms.
China needs to advance its reforms of state-owned enterprises and protect intellectual property rights, Xi said.
"This is not something imposed on us. We are doing this out of our initiative," he said.
Xi said he told IMF chief Kristalina Georgieva, who met him earlier, that China will continue on the path of financial reform and opening, but "the precondition is that we will ensure security of our nation's financial sovereignty."
Technology is another major front in the trade war, with Washington angering Beijing by imposing sanctions on telecom giant Huawei amid US concerns that its equipment could be used for Chinese espionage.
Xi warned that a "technological iron curtain" would "affect the future prospect of humanity."
Paulson, the former US Treasury chief, told Xi that 5G wireless technology could be "either a potential area of conflict or cooperation for China and US."
"I believe key to minimizing conflict is if we can develop shared standards for emerging technologies," he said.
Kissinger, who warned at the forum Thursday that the trade war could snowball into armed conflict, told Xi that "our nations have to cooperate if there is to be a prosperous international order."
Xi also invoked his "Chinese dream" of national rejuvenation -- his goal of restoring the Asian giant to its rightful place in the world.
"It is not a dream about hegemony it is not about replacing others," the Communist Party chief said.
"We are just trying to restore our place and role in the world rather than reliving the humiliating days of the semi-colonial and semi-feudal era," Xi said. "We will not relive those days again."