After a troublesome 17-month run, Ron Johnson is out as chief executive of J. C. Penney, and with that, the most closely watched revival effort in retail in recent memory is in danger of disintegrating.

The company’s board said on Monday that Mr. Johnson, who engineered Apple’s retail strategy, is leaving Penney and that Myron E. Ullman III, who had been C.E.O. at the retailer for seven years until Mr. Johnson took over, has returned to the helm.

Talk of Mr. Johnson’s possible departure had been swirling in recent weeks as Penney’s troubles with sales and strategy mounted, and as William A. Ackman, the activist investor and board member who recruited Mr. Johnson to revive Penney’s fortunes, seemed to withdraw support for him late last week.

Still, it is a curious move to go back to Mr. Ullman. Most of the senior employees that he had assembled at Penney either left or were dismissed by Mr. Johnson. And it was dissatisfaction with where Mr. Ullman was taking the company that led Mr. Ackman to look for another leader in the first place. Though profitable, Penney was seen as a mediocre retailer that was losing ground to competitors like Macy’s and Kohl’s.