Cambridge Analytica, a data firm that worked for President Donald Trump’s 2016 campaign, is shutting down following allegations about its misuse of Facebook data and the campaign tactics it pitched to clients.

In March, the company suspended its chief executive, Alexander Nix, and said it was launching an independent investigation to determine if the company engaged in any wrongdoing in its work on political campaigns.

The...