A Goldman Sachs sign is seen on at the company's post on the floor of the New York Stock Exchange.

Goldman Sachs has been sued by a former vice president who alleges his firing by the Wall Street bank is a case of sexual orientation discrimination.

William Littleton, who is openly gay and was a leader of Goldman's internal LGBTQ network, says his complaints about a discriminatory atmosphere on the job led to his dismissal.

Littleton's suit, filed Wednesday in New York state court, alleges that after he formally complained about discrimination and detailed examples of mistreatment, he was abruptly fired in "a blatant act of retaliation."

A Goldman Sachs spokesman said Wednesday that the company "has a sustained and proven commitment to diversity, and we are proud of the vibrant and diverse LGBTQ community at the firm. We strongly encourage all of our employees to bring their authentic selves to work, because it makes us a better firm. This suit is without merit and we plan to defend ourselves against these baseless claims."

Littleton's lawsuit alleges that a supervisor excluded him from an important conference call because he "sounded too gay."

A 2018 Human Rights Campaign study found that 53 percent of LGBTQ workers report hearing jokes about lesbian or gay people at least once in a while at work.

Littleton complained directly to the Employee Relations team at Goldman in 2018, saying he had been subjected to numerous incidents of homophobia and discrimination. The lawsuit alleges that after Littleton complained, two Goldman managers included "significant unwarranted criticism in his performance review." The lawsuit alleges these criticisms were used to create a paper trail for using performance as a reason for termination.

In recent years, Goldman has made many moves to support the LGBTQ community and promote inclusivity, but the lawsuit calls the efforts "lip service to LGBTQ diversity."

In its 2018 partners' report, Goldman said that 5% of partners identified as LGBTQ. The bank covers sexual reassignment surgery for employees, and since at least 2017, it has asked job candidates to identify as lesbian, gay, bisexual or transgender when they apply for the job, using a method similar to the data requested by the Equal Employment Opportunity Commission for other demographic factors. The information is removed from the hiring process but can be used by the bank as a subsequent check on its workforce diversity. Goldman also has promoted recent events focused on its LGBTQ network.

Goldman received a perfect score of 100 on the Human Rights Campaign's 2018 Corporate Equality Index.

Littleton's lawsuit, filed by the Wigdor law firm, says he was an employee for eight years and had years of "outstanding" performance reviews. He was on the specialty solutions team within the product strategy group at Goldman, where he focused on investment products for clients and institutions, including use of the firm's recently introduced exchange-traded funds.

Littleton started at Goldman after graduating from Amherst College in 2010 and worked his way up from analyst to vice president by 2016, at age 27.

"Wall Street continues to struggle to create an environment that is inclusive and accepting of LGBTQ+ employees," Wigdor partner David E. Gottlieb said in a statement. "Mr. Littleton's experiences demonstrate that Goldman Sachs in particular has failed to embrace this important responsibility. We intend to send a message to all businesses in New York, and Goldman in particular, that this type of treatment towards LGBTQ+ employees will not be tolerated."

The lawsuit notes a 20017 Institutional Investor feature found widespread issues on Wall Street related to treatment of LGBTQ workers.

—Additional reporting by Joe Andrews. CNBC's Dan Mangan contributed to this report.

Subscribe to CNBC on YouTube.