Foreign Ministry spokeswoman Hua Chunying added Beijing would “take measures to safeguard” the “legitimate interests” of Chinese companies.
The US, however, has welcomed the move and announced new restrictions against the firm.
Secretary of State Mike Pompeo said the US would curb travel access for some of Huawei’s workers.
“The State Department will impose visa restrictions on certain employees of Chinese technology companies like Huawei that provide material support to regimes engaging in human rights violations and abuses globally,” he told a news conference.
Mr. Pompeo also passed comment on the fact the UK had given mobile networks until 2027 to remove Huawei’s 5G equipment, saying: “Faster is always better.”
Earlier, President Trump had seemingly taken personal credit for the UK’s action.
“We convinced many countries, many countries – and I did this myself for the most part – not to use Huawei because we think it’s an unsafe security risk,” the US leader said.
Mr. Trump made the comments as he attempted to increase pressure on Beijing by announcing an executive order ending preferential treatment for Hong Kong in response to a new security law brought in by China.
Huawei has repeatedly said it would not cause harm to any country.
The UK’s digital secretary announced on Tuesday the country’s telecoms networks would not be allowed to buy a new Huawei 5G kit from 31 December and all such equipment should be stripped out of mobile networks by 2027.
In addition, it wants BT’s Openreach and other broadband infrastructure providers to stop using Huawei’s gear in the rollout of full-fiber broadband within the next couple of years.
China’s ambassador to the UK said the decision was “not only disappointing, it’s disheartening”.
“The way you treat Huawei will be followed very closely by other Chinese businesses,” Liu Xiaoming added.
But the foreign ministry arguably used even stronger language.
“The UK side has used groundless risks as an excuse to co-operate with the United States… violating the relevant commitments made by the UK,” Ms. Hua said.
“Any decisions and actions must come at a cost,” she added, without being more specific.
Mr. Huiyao Wang – an adviser to the Chinese government – told BBC Radio 4’s Today program Beijing still hoped the 2027 ban might be reversed before it came into effect.
But, as things stood, it could have an impact on other Chinese investment in Britain.
“It goes against the UK tradition as the open liberal leader in free trade,” the founder of the Centre for China and Globalisation think tank said.
“This is going to probably have very negative implications.”
The UK government said it had based its decision on the advice of security chiefs who had judged they could no longer mitigate the risks of using Huawei’s equipment in light of new US sanctions.
The sanctions are designed to prevent the company from having its own chips manufactured, making it buy in supplies from elsewhere.
And GCHQ’s National Cyber Security Centre said this meant Huawei’s equipment was likely to face more “security and reliability problems” as a consequence.