The world’s biggest mining company is plotting a new future. It wants to focus solely on mining. BHP Group Ltd. said it is considering selling its oil-and-gas business in what would rank as one of the energy industry’s biggest deals this year: Analysts estimate the unit could be worth at least $15 billion. It is talking with Australia’s Woodside Petroleum Ltd. about a possible deal in which BHP shareholders would receive Woodside stock.

BHP has long justified its oil-and-gas investment—which sets it apart from mining rivals—as a way to hedge against swings in prices of other commodities, such as iron ore.

That stance hasn’t always chimed with shareholders. Four years ago, activist investor Elliott Management Corp. bought a stake and urged sweeping changes, including unloading oil and gas assets. BHP’s review of the business ahead of a possible sale is further evidence that resources companies are responding to growing pressure from investors and governments to cut emissions. In May, the International Energy Agency said that to meet a goal of zero net carbon emissions globally by 2050, investment in new fossil-fuel supply projects must immediately cease.

Since last year, several large European oil companies including BP PLC and Royal Dutch Shell PLC have committed to eliminate emissions and begun selling higher-carbon-emitting fossil-fuel assets and investing more in renewable energy. Following one of the costliest proxy fights ever, an activist hedge fund elected three new members to Exxon Mobil Corp.’s board and pressed for a bolder path to reducing emissions.

BHP has already been working through plans to sell its thermal-coal-mining operations, saying it wants to concentrate its coal business on higher-quality coking coals, used to make steel. And last year Chief Executive Mike Henry said BHP would look to sell some oil and gas assets “that are mature or which are likely to realize greater value under different ownership.”

Investor concerns about climate change have risen sharply in the past 18 months, said Angus Gluskie, managing director at White Funds Management in Sydney, which holds BHP shares. The pandemic may have played a part by underscoring global risks that some investors had been blasé about, he said.

BHP has owned oil and gas assets since the 1960s. They currently include stakes in oil fields in the Gulf of Mexico and Australia’s Bass Strait and interests in two Australian properties operated by Woodside: the North West Shelf liquefied-natural-gas facility and the Scarborough natural-gas project.

As recently as February, BHP reiterated its intent to continue investing in high-return petroleum projects and unload more-mature operations. BHP earlier this month approved one $544 million oil project in the Gulf of Mexico and said it would spend a further $258 million to advance another.

Selling the petroleum business would leave BHP focusing on mined commodities: iron ore, metallurgical coal, copper and nickel—as well as potash if it proceeds with a large Canadian project.

Of these commodities, iron ore accounts for the largest share of BHP’s profits, though the miner is focused on growing in copper, nickel and possibly potash, which it expects to be in great demand for years to come in the shift to a lower-carbon economy.

Mr. Henry in February said he didn’t view BHP’s oil business as incompatible with its climate goal of cutting operational greenhouse-gas emissions by at least 30% between 2020 and 2030.

“We, of course, recognize the trends that are playing out around us in terms of long-term oil and gas demand in a decarbonizing world,” Mr. Henry told analysts following BHP’s half-year earnings in February.

He said BHP viewed the industry as broadly attractive for the next decade and likely beyond, though less appealing over time. But if BHP hangs on to its oil operations that long they might become less valuable to a buyer, investors say.

Petroleum isn’t a huge earner for BHP. While at times it has accounted for up to a quarter of income, over the past four years its share of annual earnings has been only about 10%, Macquarie said. The bank said the business accounts for about 8% of BHP’s total value.