Red Hat Inc.’s finance chief Eric Shander has been dismissed from the company, forfeiting a $4 million retention award that was agreed to ahead of Red Hat’s acquisition by International Business Machines Corp.

The Raleigh, N.C.-based software company confirmed late Thursday that Mr. Shander was no longer working at Red Hat. “Eric was dismissed without pay in connection with Red Hat’s workplace standards,” a company spokeswoman said in a statement.

The company, which said that its accounting and control functions remain healthy, on Friday declined to provide specifics about what led to Mr. Shander’s dismissal.

Newsletter Sign-up CFO Journal The Morning Ledger provides daily news and insights on corporate finance from the CFO Journal team. PREVIEW

Mr. Shander didn’t immediately respond to a request for comment.

Mr. Shander was named Red Hat’s permanent chief financial officer in April 2017 after a stint as acting CFO, according to the spokeswoman. He had served in various finance roles at IBM and Lenovo Group Ltd. before joining Red Hat in 2015.

Mr. Shander’s ouster comes about three months after IBM completed its $34 billion purchase of Red Hat, a move aimed at capturing growth opportunities in the cloud space.

His departure puts Red Hat in a difficult spot, said Ivan Feinseth, director of research at Tigress Financial Partners LLC, an investment banking firm.

“The fallout for companies in these situations is not only the dismissal of an executive but also the litigation risk,” Mr. Feinseth said. “Companies could be held responsible for not creating and maintaining a proper workplace environment.”

IBM said it supports Red Hat’s decision to dismiss Mr. Shander. “Our values are fully aligned in this area,” a spokesman said.

Red Hat and Mr. Shander on May 31 agreed to a cash retention award of $4 million that would vest in two installments, six months and 12 months after the closing date of the transaction with IBM. The retention award, and others like it, were intended to keep key employees in place during the transition period, the company said in a filing.

Mr. Shander was dismissed without pay, the company said. To receive a retention payment installment, Mr. Shander would have had to remain continuously employed by the company or an affiliate through the vesting date, according to the agreement.

Laurie Krebs, Red Hat’s senior vice president for finance, has taken over as CFO, the company said. “We have confidence that Laurie will help continue and drive Red Hat’s strong momentum, including that resulting from the acquisition by IBM,” the Red Hat spokeswoman said in an emailed statement.

IBM is scheduled to report quarterly earnings on Oct. 16, with analysts and investors expecting insights into the current state of the business.

“We need to see some sort of recovery in top-line growth,” said Moshe Katri, an analyst at Wedbush Securities Inc., pointing to successive quarters of revenue declines at IBM.

The company said in July that revenue fell for its fourth straight quarter.

Write to Nina Trentmann at Nina.Trentmann@wsj.com