The Chinese telecom giant Huawei, which runs this production campus in Dongguan, has long been a point of national pride.

When an executive wrote about her house arrest in Canada, an outcry about a former employee’s treatment arose on social media.

On the first anniversary of her arrest in Canada, Meng Wanzhou, the chief financial officer of the Chinese telecom giant Huawei, issued an open letter describing how she experienced fear, pain, disappointment, helplessness, torment and acceptance of the unknown.

She wrote at length about the support she received from her colleagues, about friendly people at a courthouse in Vancouver and about “numerous” Chinese online users who expressed their trust.

On the Twitter-like social media platform Weibo, many users posted the numbers 985, 996, 251 and 404 in the comment section below her letter. They were slyly referring to a former Huawei employee who graduated from one of the country’s top universities in a program code-named 985, worked from 9 a.m. to 9 p.m. six days a week and was jailed for 251 days after he demanded severance pay when his contract wasn’t renewed.

Her letter, posted on Monday, was not well received on the Chinese internet, where Ms. Meng is known — in a term meant to be endearing — as “princess” because she is a daughter of Huawei’s founder, Ren Zhengfei.

ADVERTISEMENT

His story went viral in China, generating angry responses online. That resulted in 404 error messages as articles and comments were deleted, a sign of China’s censors at work.

The former employee, Li Hongyuan, was eventually released from jail with no charges and received $15,000 in government compensation last week. He shared his story online last week, and that was when the hit to Huawei’s reputation began.

Image Meng Wanzhou, the chief financial officer of Huawei, has been detained in Canada and is facing extradition to the United States on fraud charges. Credit... Lindsey Wasson/Reuters

“One enjoyed a sunny Canadian mansion while the other enjoyed the cold and damp detention cell in Shenzhen,” Jiang Feng, a psychologist, commented on the Quora-like question-and-answer site Zhihu. Ms. Meng has been under house arrest in a six-bedroom home, awaiting potential extradition to the United States on charges that she conspired to defraud banks about Huawei’s relationship with an Iranian company.

ADVERTISEMENT

The anger directed toward Ms. Meng reflected an uneasy moment for both Huawei and China’s middle-class professionals. In the past year, Huawei had been fending off claims by the United States government that it is secretive and unreliable and that it spies for Beijing, an allegation the company has repeatedly denied.

In China, however, Huawei has been considered the crown jewel of the country’s tech industry and has enjoyed tremendous good will. Many Chinese proudly abandoned their iPhones for Huawei phones. But the backlash to the jailing of a longtime employee after a labor dispute has made it clear that people in China are starting to sour on the company.

Image A production line in Dongguan. The jailing of a former Huawei employee in a labor dispute led to a backlash on social media. Credit... Kevin Frayer/Getty Images

The anger on social media was also indicative of new insecurity among members of China’s middle class, who have never experienced an economic downturn and have always thought they had more protections than lower-paid migrant workers. People said they could see themselves in Mr. Li.

ADVERTISEMENT

“Many middle-class Chinese used to believe that if they went to good schools, worked hard and cared little about the current affairs they would be able to realize their Chinese dreams,” a blogger wrote on Weibo. “Now their dreams are in tatters.”

Huawei declined to comment on the public response.

Mr. Li, a Huawei employee for 12 years, negotiated a $48,000 severance package in March 2018, according to interviews he gave to Chinese media outlets. But he didn’t get an end-of-the-year bonus that he said had been promised to him. He sued Huawei in November last year.

A month later, he was detained in Shenzhen and accused of leaking commercial secrets. He was officially arrested in January on an extortion accusation. But he was released in August with no charges. He did not respond to interview requests.

Huawei insisted in a statement that it had done nothing wrong and challenged Mr. Li to prove that he had been treated unfairly.

ADVERTISEMENT

“Huawei has the right, and in fact a duty, to report the facts of any suspected illegal conduct to authorities. We respect the decisions made by the authorities,” the statement said. “If Li Hongyuan believes that he has suffered damages or that his rights have been infringed, we support his right to seek satisfaction through legal means, up to and including lawsuit against Huawei.”

Online commentators called the statement “arrogant” and “cold blooded.” “The elephant stepped on you, but you can step back on it,” one popular WeChat article said. “What a response of justice!”

Jiang Jingjing, a blogger, criticized Huawei for trampling on its employees’ rights with its tough performance evaluation system and legal firepower. “Once a company becomes a cold, dehumanized grinding machine, what’s the point for it to exist?” he wrote.

Image Huawei workers sleeping at their cubicles during their lunch break. Credit... Kevin Frayer/Getty Images

In some ways, new criticism of Huawei harks back to the early days of the company. Huawei cultivated an aggressive “wolf culture” that encouraged its employees to work extremely hard.

ADVERTISEMENT

New employees would get a mattress when they joined because everyone was expected to work late and often sleep in the office. Over a decade ago, a series of employee deaths drew harsh scrutiny of the company. An investigative report by a news weekly counted six unnatural deaths in two years, including four suicides.

Since then, especially after the United States started a global campaign to try to stop its allies from using Huawei’s next-generation wireless technology, known as 5G, Huawei has become a symbol of China’s technology prowess and American attempts to keep China down.

After Ms. Meng’s arrest, there was an outpouring of support for Huawei. In the most recent quarter, Huawei’s smartphone sales in China grew 66 percent from a year earlier. Sales for Apple and most of Huawei’s domestic competitors declined, according to the research firm Canalys.

ADVERTISEMENT

Now many people are talking about boycotting Huawei products. Images of a pair of Huawei-branded handcuffs are circulating online as a new, smart-fitness wristband. One of the “bands” is called the “free meal and accommodation version,” referring to jail life.

Tang Ting, a public relations executive, posted on his WeChat social media timeline that the outrage could cause long-lasting damage for Huawei’s brand. Chinese companies think consumers respond only to freebies and discounts, he wrote, “but a very high percentage of the young generation care about values, too.”

In a sign that many middle-class professionals are worried that what happened to Mr. Li could happen to them, online users circulated articles about jail life, especially in the Longgang detention center in Shenzhen, where Mr. Li spent more than eight months. Huawei is based in Shenzhen’s Longgang district.

ADVERTISEMENT

Some online users are circulating a three-part blog post by a programmer who spent over a year in the detention center for working on gaming and gambling software. Gambling is illegal in China. The blogger wrote in detail what it was like to live in a 355-square-foot cell with 55 people in tropical weather — what they ate, wore and did every day.

Image A Huawei store in Beijing. Talk of a boycott has spread on Chinese social media. Credit... Mark Schiefelbein/Associated Press

Many Chinese are especially outraged by the degree to which news coverage and online responses have been censored. They say they feel helpless because they can’t criticize the government. Now they feel they are also not able to criticize a giant corporation.

One of the Weibo posts of Ms. Meng’s letter received 1,400 comments. Many simply said 251, the number of days Mr. Li was detained. Fewer than 10 comments, sympathetic ones, are still visible to the public.

ADVERTISEMENT

“A company that’s too big to criticize is even scarier than a company that’s too big to fail,” Nie Huihua, an economics professor at Renmin University in Beijing, told the news site Jiemian on Tuesday.

Jiemian’s interview with Mr. Li, published on Monday, was deleted.

Li Yuan writes the New New World column, which focuses on the intersection of technology, business and politics in China and across Asia. @liyuan6

Correction: Dec. 4, 2019 An earlier version of this article misidentified the definition of 985. It is the code name of an education program for three dozen top universities in China. It does not refer to the country’s 985 top universities. Dec. 4, 2019

Sign up for On Tech with Shira Ovide Your guide to how technology is transforming our lives and the world. Sign Up