Bill Ackman’s Pershing Square Capital Management LP sold his J.C. Penney Co. stake for $504 million, about half of what he paid for it, marking an end to more than two years of failed efforts to revamp the retailer.

Citigroup Inc. managed the underwritten offering of the 39.1 million shares of the Plano, Texas-based department-store chain at a price of $12.90 apiece, New York-based Pershing Square said in a statement today. That’s 3.4 percent less than yesterday’s closing price of $13.35.

The stake sale hands Ackman a $500 million loss and ends a saga in which his handpicked CEO Ron Johnson’s plan to turn the chain’s stores into collections of boutiques alienated customers, leading to the worst annual sales in more than two decades. It also follows Ackman’s agreement earlier this month to quit J.C. Penney’s board after a public clash over its direction and management succession.

“Ackman overplayed his hand with Johnson,” Paul Swinand, an analyst for Morningstar Inc. in Chicago, said in an interview. The stake sale will be the end of a “debacle” for J.C. Penney and its shareholders, he said.

J.C. Penney declined 0.5 percent to $13.28 at 9:37 a.m. in New York. The stock sank 32 percent this year through yesterday, compared with a 16 percent gain for the Standard & Poor’s 500 Index.

Jennifer Burner, a spokeswoman for Pershing Square, and Daphne Avila, a J.C. Penney spokeswoman, didn’t immediately respond to requests for comment.

Board Anger

Ackman stepped down from J.C. Penney’s board after sparring with his fellow directors over his push to replace Mike Ullman, who succeeded Johnson in April as interim CEO. He drew the board’s anger in the previous week by making public a letter he sent to directors saying he had persuaded former J.C. Penney CEO Allen Questrom to agree to return as chairman if he approved of the next CEO.

Pershing Square became J.C. Penney’s largest shareholder in October 2010. Ackman joined the board in February 2011 and began pushing for changes, assuming the activist investor role he took at other companies, including Target Corp. Four months later, J.C. Penney chose Johnson to replace Ullman as CEO, hiring him away from heading Apple Inc.’s successful stores.

Johnson’s strategy flopped, leading to a $985 million loss for the year ended in February as sales plunged 25 percent to the lowest since at least 1987.

It’s been a tough year for Ackman. His $11.2 billion Pershing Square is trailing many of its biggest rivals this year with a 3.7 percent return through July in his largest fund.

Herbalife Bet 

Ackman is also nursing a paper loss on his short bet on Herbalife Ltd., a weight-loss and nutritional supplement company, which he has accused of being a pyramid scheme. The company has repeatedly denied the accusation. Carl Icahn and George Soros’s family office have taken the other side of the bet, helping the shares almost double in value this year.

Ackman’s career has been dotted with both high-profile wins and jaw-dropping losses. He raised a $2 billion fund to invest in retailer Target in 2007, and then lost 90 percent of the money in the next two years. At the time he called it “one of the greatest disappointments” of his career.

The J.C. Penney offering is expected to close Aug. 30, Pershing Square said.

At least one large investor has pulled money over Pershing Square’s performance. Soros Fund Management LLC, the family office of billionaire Soros, asked to withdraw about $250 million from Pershing Square last year. Because Ackman’s firm only gives back a portion of investor cash each quarter, Soros won’t get all its money back until next year.

Penney Turnaround

The turnaround that eluded Johnson at J.C. Penney may be gathering steam under Ullman. Since replacing Johnson in April, Ullman has revived discounting and brought back merchandise to attract core customers while shoring up J.C. Penney’s cash balance with a $2.25 billion loan and an $850 million drawdown from a revolving credit facility.

In the second quarter, the retailer’s sales decline slowed. Revenue in the quarter ended Aug. 3 fell 12 percent to $2.66 billion, less than the 23 percent drop in the same period last year.

Ullman has also attracted other hedge fund investors besides Soros and Icahn who back his strategy. J. Kyle Bass, who focuses on corporate turnarounds, has accumulated a long position in J.C. Penney this month by buying the company’s secured loans, according to a person familiar with the matter, who asked not to be named because the information is private.

To keep the turnaround going, Ullman will have to preserve cash. J.C. Penney said on Aug. 20 when it announced its quarterly results that it expected to end the year with more than $1.5 billion in liquidity and that the forecast doesn’t assume outside financing.