Yin Yi joined Facebook's core growth team in July and he was fired after he participated in a protest demanding justice for Qin Chen, an employee who committed suicide at the company's headquarters on Sept. 19.

A Facebook software engineer told CNBC on Tuesday that he was fired by the company in part for speaking out about his colleague's suicide last month.

Yi Yin joined Facebook's core growth team in July and he was fired after he participated in a protest demanding justice for Qin Chen, an employee who died by suicide at the company's headquarters on Sept. 19.

"We need the truth. We need a fair investigation on what on earth had happened," Yin told ABC 7 at the protest on Sept. 26.

Yin told CNBC he spoke with the press at the protest because he had heard rumors that Chen may have been an H-1B visa worker and worried about his future after receiving a poor performance review by his superiors. Chen worked in Facebook's advertisement engineering team, which Yin and others said is notorious for being a high-stress unit. Yin did not know Chen, but said he believes rumors that Chen was bullied by his manager at Facebook.

"I really want people to be aware of the H-1B abuse and also the PSC system," Yin told CNBC. The PSC, or performance summary cycle, is Facebook's performance review system, in which employees go through semi-annual reviews that include extensive peer reviews. Some employees have criticized the system for penalizing people who are good performers, but don't participate in social activities with peers.

Yin said he was not the only Facebook employee to attend the protest on Sept. 26, but his colleagues hid their employee badges while he did not. Yin informed the director of the core growth team about his participation and wrote a summary of the event.

After the protest, Yin was contacted by Facebook's human resources department. "To respect the privacy of [Chen] and his family please do not discuss the incident with anyone especially outside the company," reads an email Yin received from Facebook HR on Sept. 26, which CNBC has seen.

Yin says he received a final warning letter from HR on Oct. 1. On Oct. 3, he asked his team mentor if the final warning letter meant that he was going to be fired. On Oct. 7, Yin says, he received a call from HR informing him that he was being fired for speaking with the press and for making comments that made his colleague feel uncomfortable.

"I've been under intense psychological pressure from HR," Yin told CNBC.

In an email confirming his firing, which CNBC has seen, Facebook also told Yin he would be required to pay back a portion of his sign-on bonus. Yin said he just paid back the bonus, which came out to $39,000.

A Facebook spokesperson denied that Yin was fired for participating in the protest or talking to the media.

"This employee was not fired for joining a protest or talking about the recent tragedy on our campus. He was here for a matter of weeks, and showed poor judgement in a string of policy violations. We won't stand for our employees intimidating one another."

Facebook declined to offer further details about Yin's case, saying, "We won't get into the specifics of confidential, internal conversations."

Since his termination, Yin has spoken with the lawyers who are representing Chen's family about his own situation. Like Chen, Yin is from China and on a work visa, so he must find a new job by the end of January or return to his home country.

Additionally, Yin said he wrote a piano sonata dedicated to the Sept. 26 protest that he hopes to play in public this January.

"The reason why I stood out protesting and speaking to the media is because I don't want Mr. Chen's incident somehow happening to anyone again," Yin said.

WATCH: Here's how to see which apps have access to your Facebook data — and cut them off