Update (Sept. 15, 9:00 a.m. ET): Social Finance CEO and co-founder Mike Cagney resigned effective immediately, according to the company.

Online lender Social Finance announced Monday that its CEO and co-founder Mike Cagney would step down by the end of the year. His resignation follows a lawsuit concerning sexual harassment allegations against the company, as well as separate charges that Cagney made risky business decisions.

Cagney, who is also leaving his position as chairman of the San Francisco-based startup, attributed the decision to "the combination of HR-related litigation and negative press" in a letter to employees obtained by The New York Times. A company spokesman disputed the allegations of reckless strategies and another said the sexual harassment claims against managers at SoFi were "investigated in depth by the company and found to have no merit," according to the Times.

Launched in 2011, SoFi reportedly is valued at more than $4 billion. The company said in a statement that it has lent a total of over $20 billion to more than 350,000 customers. It started by offering customers student loan refinancing and expanded to include personal loans and mortgages.

In August, former employee Brandon Charles sued the company, claiming he was fired after reporting that managers had sexually harassed their coworkers. In the lawsuit, Cagney was accused of "empowering other managers to engage in sexual conduct in the workplace," according to the Times. Cagney, who is married, was also accused several years ago of sending sexually explicit text messages to an executive assistant, an incident that resulted in a five-figure settlement, the Times reported.

The upheaval at SoFi comes at a time when Silicon Valley startups have come under scrutiny for sexual harassment allegations against executives, as well as for mishandling such claims.