The embattled political consulting firm Cambridge Analytica announced on Wednesday that it would cease most operations and file for bankruptcy amid growing legal and political scrutiny of its business practices and work for Donald J. Trump’s presidential campaign.

The decision was made less than two months after Cambridge Analytica and Facebook became embroiled in a data-harvesting scandal that compromised the personal information of up to 87 million people. Revelations about the misuse of data, published in March by The New York Times and The Observer of London, plunged Facebook into crisis and prompted regulators and lawmakers to open investigations into Cambridge Analytica.

In a statement posted to its website, Cambridge Analytica said the controversy had driven away virtually all of the company’s customers, forcing it to file for bankruptcy in both the United States and Britain. The elections division of Cambridge’s British affiliate, SCL Group, will also shut down, the company said.

But the company’s announcement left several questions unanswered, including who would retain the company’s intellectual property — the so-called psychographic voter profiles built in part with data from Facebook — and whether Cambridge Analytica’s data-mining business would return under new auspices.