The firing of a Chinese Facebook engineer who accused the social-media giant of mistreating him has provoked anger in China.

As first reported by Bloomberg, Yi Yin said he received an email warning on the same day he attended the memorial of a Facebook colleague, Qin Chen, who killed himself by jumping from the window of a company building.

Yin was dismissed Monday after receiving two formal warnings — the 37-year-old has since posted on WeChat that he was forced out for "lack of judgement," and he says he wasn't told which rule he broke.

A thread about Yin's dismissal on the Chinese discussion forum Zhihu has been viewed more than 1.6 million times after his story was widely circulated on WeChat.

"Facebook did not fire Yin Yi for participating in the protest or talking about the death of Qin Chen. That said, Facebook expects all of our employees to treat one another with respect," a Facebook spokesman told BI.

Visit Business Insider's homepage for more stories.

Chinese social media has erupted in anger over the dismissal of a Chinese engineer from Facebook.

The California-based software engineer Yi Yin's story was circulated on WeChat and widely debated on a Chinese discussion forum, according to Bloomberg.

Per Bloomberg, Yin said he received an email warning on the same day he attended the memorial of a Facebook colleague who died after jumping from the window of a company office.

Yin's colleague, an adult man, Qin Chen, jumped from the fourth floor of an office building at Facebook's Menlo Park, California, headquarters last month. The man who died was also Chinese, according to Bloomberg.

The day after the memorial — which was attended by about 400 people — Yin was called into a company meeting. At the meeting, he was told to stop speaking publicly about his colleague's suicide. The company cited privacy issues as the reason, according to Bloomberg.

Read more: 12 former Facebook insiders who ditched the company and are now outspoken critics

After a second and "final" warning, the 37-year-old was dismissed Monday, and he has since posted on WeChat that he was forced out for "lack of judgement." Yin said this final warning didn't mention any breaches of company rules, according to the same Bloomberg piece.

A Facebook spokesman told Business Insider that "Facebook did not fire Yin Yi for participating in the protest or talking about the death of Qin Chen. That said, Facebook expects all of our employees to treat one another with respect, particularly when dealing with sensitive issues.

"We won't hesitate to take action to make sure all of our people feel safe and comfortable at work," the spokesman added.

A "like" sign at Facebook's Menlo Park, California, headquarters, where an employee killed himself last month. Justin Sullivan/Getty Images

A thread about Yin's dismissal on the Chinese discussion forum Zhihu has been seen over 1.6 million times after his story circulated on WeChat. Yin himself also posted about his treatment on LinkedIn last week; the post garnered more than 7,000 likes and nearly 800 comments.

A translated version of his post said: "Thank you for your concern, after participating in the protest, interviewing in person and asking the company to tell the truth, I am still fine. The pressure is a little bit bigger. I got a final warning letter, and I'm going to put it up, put it in a box, and hang it on the bedroom wall. Update: Have been officially dismissed and returned to freedom."

Yin's comments about his experience with Facebook ties in with prior reports about the company's culture.

A CNBC report from January, on people's experiences of working at Facebook, paints the firm as hierarchical and averse to dissent.

One ex-Facebook employee, who left the firm in late 2018, is quoted by CNBC as saying that "even if you are f---ing miserable, you need to act like you love [Facebook]. It is not OK to act like this is not the best place to work." The piece added that "several" former employees likened Facebook's company culture to a "cult."

If you or someone you know is struggling with depression or has had thoughts of harming themselves or taking their own life, get help. The National Suicide Prevention Lifeline (1-800-273-8255) provides 24/7, free, confidential support for people in distress, as well as best practices for professionals and resources to aid in prevention and crisis situations.