The former prime minister said he had previously had no knowledge of the claims, which have been made by a former employee during a US congressional hearing.
David Cameron has resigned from his role with software company Afiniti after its founder was accused of sexual harassment and assault.
The former prime minister said in a statement that he had quit his post as chairman of the firm's advisory board with immediate effect.
Mr Cameron's announcement came a day after former employee Tatiana Spottiswoode detailed allegations against chief executive Zia Chishti in a US congressional hearing.
Ms Spottiswoode told the hearing that after signing a contract with the company in April 2016, it became clear Mr Chisti "was not willing to treat me like an employee".
"Instead, over the next 18 months he oscillated between pressuring me for sex and punishing me," she said.
"When I rebuffed him he humiliated me in front of co-workers and then ignored me completely, causing me to fear for my job."
A spokesman for Mr Cameron said he had "absolutely no knowledge" of the claims until the public testimony and stressed they allegedly took place before he began chairing the board in 2019.
"Mr Cameron understands that the allegations are disputed, but disagrees with the approach being taken by the company in responding to the matter," a statement said.
"He made this view clear to Mr Chishti yesterday.
"Mr Cameron has therefore resigned as chairman of the company's advisory board with immediate effect.
"He does so with regret, given the success and promise of this exciting company, and the commitment, dedication and loyalty of the many hard-working employees with whom he has enjoyed working."
Afiniti, which is based in Bermuda and provides call centre technology, also employs Princess Beatrice, as vice-president of strategy and partnerships at the firm.
Mr Cameron's post-Downing Street career has previously come under intense scrutiny following the Greensill affair.
The former Conservative leader was widely criticised for privately lobbying ministers in an attempt to secure access to an emergency coronavirus loan scheme for the finance firm, which collapsed in March.
A spokesperson for Afiniti said: "We respect David Cameron's decision to step down from his role as chairman of Afiniti's advisory board.
"We are very grateful to Mr Cameron for his immense contribution during a period of significant growth for Afiniti.
"In regards to the claims made against our CEO and chairman Zia Chishti, we take any allegations of this nature extremely seriously.
"Afiniti has investigated Tatiana Spottiswoode's claims with independent counsel and concluded that the arbitral decision she references was erroneous.
"Mr Chishti strongly disputes all accusations against him."