William Ackman’s hedge fund is selling down his biggest investment, as a disastrous bet on Valeant Pharmaceuticals International Inc. tears a hole in its portfolio.

The activist investor said his Pershing Square Capital Management LP sold 20 million shares in Mondelez International Inc. after the market closed, which would yield $834 million at current prices.

The...