William A. Ackman has officially hoisted the white flag in his boisterous and costly five-year campaign against Herbalife, the nutritional food supplement company, which he claimed was an outright fraud.

Mr. Ackman, one of Wall Street’s most outspoken hedge fund managers, disclosed on CNBC on Wednesday that he had quietly unloaded his remaining positions in Herbalife — a bet that at one time had been valued at $1 billion by his Pershing Square Capital Management.

In the annals of Wall Street, investors have lost more on trades. But Mr. Ackman’s bearish bet on Herbalife was a signature event given how much time, effort and money he devoted to making his case — all in the hopes that the federal authorities would take action against Herbalife.

In fact, the Federal Trade Commission did. But its enforcement action against Herbalife in July 2016 was not the death knell that Mr. Ackman had been counting on. The commission’s settlement with Herbalife required the company to pay $200 million in consumer relief, hire an outside monitor and make substantial changes to its business practices, but it let the company continue to operate.