A new activist investor is looking to shake up the board at Dollar Tree — but another has quietly cashed in his chips.

Billionaire Carl Icahn — who took a stake of nearly 2 percent in the dollar-store chain last fall, according to sources — is no longer invested in the retailer, The Post has learned.

The news comes as activist hedgie Jeff Smith of Starboard Value disclosed a 1.7 percent stake worth $370 million in Dollar Tree on Monday. Smith is prodding the company to sell its Family Dollar chain and rethink a strict policy of selling everything for $1 or less.

Starboard’s stake was revealed three months after The Post exclusively reported that Icahn held stock.

At the time, Icahn “thought it was dirt cheap … and a poorly run company,” one source said.

But the hard-charging financier has since exited his position as the stock has become more expensive since he started accumulating shares in the low $80s last summer, two sources told The Post.

Dollar Tree shares on Monday rose 5.5 percent to close at $97.96.

Now Smith — known for jumpstarting a turnaround at Olive Garden after suggesting that it salt the pasta water — has submitted seven nominees for Dollar Tree’s 12-member board as he pushes for major changes.

At the top of his list is a sale of Family Dollar — a struggling chain that Dollar Tree bought for $8.5 billion nearly three years ago at the urging of none other than Icahn, who was a Family Dollar investor at the time.

Integration between the two brands has been bumpy and the market only is valuing Family Dollar at $1 billion to $3 billion, Smith wrote. In an auction, Family Dollar would likely fetch around $4.5 billion — a little better than half what Dollar Tree paid for it, according to Gordon Haskett analyst Chuck Grom.

Even Icahn was considering pushing Dollar Tree to sell Family Dollar, The Post reported in October.

“The one benefit to the slow progress made on the integration of the two chains is that it is not too late to separate them,” Smith wrote.

“Please do not compound the mistake of overpaying for Family Dollar by allowing that price to skew management and the board’s view as to the right independent decision for Dollar Tree shareholders today,” Smith wrote.

Smith is also calling on Dollar Tree to sell items at other prices higher than $1, noting that a dollar doesn’t buy the same size and quality it did when the store launched in 1986.

“We look forward to the opportunity to engage with Starboard regarding any suggestions they may have,” Dollar Tree said.