Harvard University spent years assembling 8,500 acres of dairy farms and roughly 5,500 cows on the South Island of New Zealand. Now it’s selling.

Private-equity giant KKR & Co. is nearing a deal to buy those holdings from Harvard for more than $70 million pending regulatory approval, said people familiar with the matter. The sale would mark an end to one of the most distinctive bets by the world’s richest endowment.

Harvard is an anomaly among endowments, holding a $4 billion natural resources portfolio that directly owns assets across five continents. The $36 billion endowment owns California vineyards, Chilean timberland and Brazilian soybean and maize farms. Its natural resources bets helped the endowment profit for more than a decade.

But it is reworking that portfolio under a new head of natural resources after Harvard wrote down its value by more than 10% last year, its biggest loss since its 1997 inception.

Harvard is also auctioning $2.5 billion of private-equity, real-estate and venture-capital fund investments, including some of its interests in Kleiner Perkins Caufield & Byers, according to people familiar with the matter. For its portfolio of fund interests, Harvard has asked buyers to lock in deals by the end of June, when its fiscal year ends, said people familiar with the matter.

Harvard aims to have roughly a third of its assets under management invested in private equity, real estate and venture capital, according to its 2016 annual report. The endowment doesn’t disclose how much it actually has invested in those areas.

Any sales would give Harvard’s new endowment chief, N.P. “Narv” Narvekar, more maneuverability as he attempts to engineer one of the investment world’s most high-profile turnarounds. The 55-year-old Mr. Narvekar has been on the job six months and moved quickly to reshape the endowment. Harvard Management Co.’s returns were second-lowest in the Ivy League for the decade ending June 30, 2016. He has announced plans to lay off roughly half the endowment’s staff and eliminate an internal hedge fund.

He has also tried to manage expectations about how quickly the endowment can change course, writing in a January letter that “transforming” the portfolio would take five years.

Under Mr. Narvekar, Harvard made a first-time investment in New York hedge fund Element Capital Management this April and recently invested with Cambridge Square Capital, a new Boston hedge fund launched by a former Harvard bond manager. Harvard also bought $1 billion worth of exposure to exchange-traded funds last quarter, according to a securities filing, in an attempt to track markets at a low cost.

Quickly scaling up or down Harvard’s illiquid natural resources holdings is more difficult. Harvard isn’t planning to sell its entire natural resources portfolio and could even buy new assets, a person close to the endowment said, but will exit investments opportunistically.

Harvard was once the envy of the endowment world, in part for its lucrative bets on farms and forests. Most other endowments invest in farmland and timber by parking money in funds. But Harvard in the 1990s began amassing direct investments in natural resources, eventually scouring the globe to buy assets directly and find local operators to care for its cows, trim trees and find buyers for the resulting commodities.

Over the decade ending 2014, the natural-resources portfolio gained an average annualized 11.6%, above the comparable return of the whole endowment. Harvard hasn’t published a more recent 10-year figure.

“They were early and they were direct—that was really the key differentiator in what they were doing versus other investors,” said Brian Caldwell, who advises U.S. endowments and foundations at consulting firm Willis Towers Watson.

Harvard first ventured into natural resources in 1997, buying a hardwood forest in the Appalachian region. Harvard snagged discounts on forestland by buying in size, believing that riding out timber-price slumps would help yield profits.

Harvard started moving away from U.S. timber in 2003, a person familiar with the matter said, a call that proved prescient when the U.S. housing market collapsed. Led by New Zealand native Andrew Wiltshire, the natural resources group diversified by going abroad and into farmland. Many deals bet on increasing consumption in the developing world, particularly China.

In New Zealand, Harvard spent about $40 million to buy dairy farms and land over the past decade, plus millions more on improvements, said people familiar with the matter. One of the people said the deal is expected to be profitable for Harvard, even with dairy prices well below their peak.

One of Harvard’s biggest natural resources wins was a more than $600 million purchase of New Zealand’s Kaingaroa forest assets. Over time, the forestry venture sold for nearly three times the endowment’s original investment, one person said.

In 2016, however, Harvard wrote down the natural resources portfolio by 10.2%. The markdowns came after senior executives overseeing the investments left in 2015 in quick succession during a time of broader turnover at the endowment.

Shedding some of these far-flung plays could mean less unwanted attention. Harvard’s Australian farm entity was reprimanded in a 2015 letter by the local heritage board for disturbing aboriginal burial grounds on a Harvard farm in New South Wales.

A year earlier, a Chilean court ruled Harvard’s Chilean logging company Agrícola Brinzal illegally destroyed native flora. Agrícola was ordered to replant trees and pay a small fine.

A Harvard endowment spokeswoman declined to comment on the Chilean ruling and reprimand in Australia.

The New Zealand dairy farms sale isn’t expected to close for months, one person close to the deal said. Harvard is also looking to sell 25,000 acres of the New South Wales farm in Australia, according to people familiar with the matter.

Folium Capital, a new Boston investment firm started by the Harvard team that made most of the natural resources investments, has spoken with Harvard about buying some assets from the endowment, said people familiar with the matter. Other private-equity firms are also exploring purchases, people said.