VIENNA—OPEC’s secretary-general said consumers should brace for more energy shortages unless the world boosts investment in new oil-and-gas development, the cartel’s first, full-throated response to increasing calls to limit such spending.

In May, the International Energy Agency, an energy watchdog for richer countries, said investment in new fossil-fuel supply projects must immediately cease if the world is going to slash net carbon emissions to zero by 2050. Meanwhile, big oil companies have made moves to curb emissions...

VIENNA—OPEC’s secretary-general said consumers should brace for more energy shortages unless the world boosts investment in new oil-and-gas development, the cartel’s first, full-throated response to increasing calls to limit such spending.

In May, the International Energy Agency, an energy watchdog for richer countries, said investment in new fossil-fuel supply projects must immediately cease if the world is going to slash net carbon emissions to zero by 2050. Meanwhile, big oil companies have made moves to curb emissions and pivot toward renewable energy sources, spurred by pressure from investors, customers and in some cases governments and courts.

If that all results in lower investment in finding and pumping new deposits of crude and natural gas, the world risks more of the sort of energy-price volatility it is seeing now, said Mohammed Barkindo, the head of the Organization of the Petroleum Exporting Countries, in an interview.

“The energy crisis in Europe and many parts of the world is a wake-up call,” he said, adding, “It all comes back to the issue of investment across the oil-and-gas industry.”

Natural-gas prices have soared amid low inventories in the U.S. and Europe, while high coal and gas prices and government efforts to cut electricity use have led to power cuts in China. Global oil prices, meanwhile, have soared this year, and are near their highest levels in three years.

The global energy crunch comes at a time of extraordinary demand, as economies bounce back after near hibernation amid the worst months of the pandemic. Mr. Barkindo said, however, that past bouts of underinvestment in new fossil fuels, and today’s pressure to curb new investment even more, have exacerbated the volatility by sapping supplies.

OPEC, a group of some of the world’s largest producers, said earlier this week that the world is projected to require $11.8 trillion in oil-and-gas investment through 2045 to meet growing demand.

In 2020, Mr. Barkindo said oil-and-gas investment fell 20%. That came despite the industry not fully making up for a previous period of underinvestment amid low prices between 2015 and 2016. “We need to buckle up more investment in capital to revive the production cycle,” he said.

“On top of that contraction, you have the energy transition,” he said, which has added more pressure on governments and oil companies to divert money from oil-and-gas development to renewables. Mr. Barkindo said there has been “a global campaign [against] the oil industry to crowd out investors out of oil and gas.”

OPEC is set to meet Monday to decide whether to pump more crude. At the start of the pandemic, the cartel and a group of allied producers led by Russia sharply reduced output to stabilize falling prices. In recent months, the two groups have been working together to slowly restore that output.

Mr. Barkindo’s call for more oil-and-gas investment comes ahead of the United Nations’ first major summit on climate since the Paris agreement in 2015. Governments will meet in November in Glasgow, Scotland, to discuss ways to lower greenhouse-gas emissions, which most scientists agree have contributed to heating the planet above preindustrial levels.

Mr. Barkindo said recommendations to cut oil-and-gas investment risk steering the conversation in Glasgow toward drastic measures that could contribute to price spikes and exacerbate energy poverty around the world.

“In our regions of the world, energy poverty is endemic,” said Mr. Barkindo, who hails from northern Nigeria. “Not one source of energy will meet the energy thirst in the developing world,” he said. “We hope that Glasgow will bring back this issue to the front burner. Climate and energy poverty will have to be addressed.”

The aim of the Glasgow summit should be to “contain greenhouse emissions, but not at the exclusion of any source of energy,” Mr. Barkindo said.

Write to Benoit Faucon at benoit.faucon@wsj.com and Summer Said at summer.said@wsj.com