Under the deal, Ackman can make up to four requests to the company to register the sale of his shares. The agreement terminates when he owns less than 5 percent of the company's stock.
Pershing Square is not legally able to sell its stock until at least Tuesday, when Penney is slated to report its second-quarter results, since Ackman is privy to confidential financial information as a board member.
The agreement, filed with the SEC, caps a tumultuous two weeks for Penney and Ackman.
Ackman went public last week with statements saying he'd lost confidence in Penney's board and that Chairman Thomas Engibous should be replaced. Ackman and the retailer's board also were bickering over how quickly the company should replace CEO Mike Ullman.
On Tuesday, Ackman resigned from the board, and Penney named Ronald Tysoe as a director to fill Ackman's seat. Tysoe is former vice chairman of Federated Department Stores Inc., which is now Macy's Inc. Penney will name an additional new director in the near future.
Ackman said in a statement Tuesday that the moves were "the most constructive way forward" for the Plano, Texas, company and all parties involved.
Penney's board also reiterated its support for CEO Ullman, who returned to that job in April. Ullman had previously served as Penney CEO from 2004 to 2011.
Ackman's departure doesn't do much to reverse Penney's declining business, which is trying to lure back shoppers turned off by a reinvention plan formulated by a former CEO backed by Ackman.
Ullman had replaced Ron Johnson, who was ousted as CEO after 17 months because his radical makeover led to massive losses and sales declines.
Ackman joined Penney's board in February 2011 and was the one who pushed the board to hire Johnson, a mastermind of Apple Inc.'s successful stores. The hope was Johnson could inject new energy into a tired company.
Penney's stock fell 45 cents, or 3 percent, to $13.38 in morning trading.