Missouri hardly produces any natural gas, unless you count the hogs.

The methane wafting from the manure ponds at swine farms across the state is increasingly funneled into pipelines and delivered to power plants and homes, where it is burned alongside shale gas for heat, hot showers and cooking.

Smithfield Foods Inc., the country’s largest pork producer, expects to be selling gas from all of its Missouri farming operations by summer. Most of its farms already feed methane into the gas grid. Once covers are stretched across the 4-acre lagoons at the rest and then connected to equipment that removes carbon dioxide and impurities from the fumes, Smithfield expects to supply enough gas in Missouri to fuel about 10,000 houses.

“We’ve been looking at how to make energy out of manure for a couple decades,” said Kraig Westerbeek, who leads Smithfield’s renewable energy business. “We’ve had some failures, but these projects show that you can actually get it done.”

Companies’ rush to affiliate with the reduction of greenhouse gases is making a big business out of harnessing the methane seeping from heaps of organic waste. So-called renewable natural gas can be produced in commercial quantities at swine and dairy farms, landfills, wastewater-treatment facilities and from spoiled food and slaughterhouse sludge.

Burning it to generate electricity or heat produces no less carbon dioxide than shale gas. But methane is a more potent greenhouse gas than carbon dioxide. Diverting methane from the atmosphere and into the energy grid is treated as a reduction of emissions and rewarded with valuable low-carbon and renewable-fuel credits, which can be traded with or separately from the gas.

Gas from actual trash usually costs many times more. It can’t compete with shale gas without subsidies like fuel credits and its beneficial effect on corporate emissions math.

Analysts and utilities believe renewable natural gas could reach 10% to 30% of total natural-gas supply by 2040. The lower end of that range will still require help from policy makers, the energy industry’s deep pockets and companies eager to burnish their environmental credentials for the funds that steer trillions of dollars with environmental and social responsibility in mind.

Pipeline companies and utilities are key to a biogas boom. Connecting manure ponds to pipelines is too costly for most farmers, but linking far-flung sources of gas to market is the day-to-day business of energy firms. Unlike operators of the electrical grid, pipeline owners don’t have wind and solar power to tout to ESG investors or to deflect skepticism over pipelines’ value in a green-energy economy.

“Renewable natural gas is something green for them to talk about,” said RBC Capital Markets analyst T.J. Schultz. “The benefit for them is it fits within their existing infrastructure. They don’t have to make changes.”

RBC estimates that commercial quantities of gas could be produced at more than 2,500 U.S. landfills, the most prolific sources, and about 8,000 farms, which yield the most valuable credits because they are the most potent polluters.

“Now the gas utilities are coming to us asking how they can get their hands on renewable natural gas and help get more systems built to green their gas source and green their pipelines,” Mr. Serfass said.

Dominion Energy Inc., a big utility striving for carbon neutrality by 2050, plans to invest $2 billion in biogas projects. It has a $200 million pact to install them on dairy farms and is pursuing another $500 million worth with Smithfield separate from the pork producer’s Missouri operations.

The partnership’s first project gathers gas in Utah’s Escalante Desert from 26 swine farms. The gas flows to a pipeline between Wyoming’s gas fields and Bakersfield, Calif. The pigs are expected to heat about 3,000 houses.

Dominion and Smithfield, the latter of which aims to eliminate more emissions by 2030 than are produced at its U.S. properties, have other projects planned or under way in Arizona, California, Virginia and North Carolina, where millions of hogs are fattened each year. “Southeast North Carolina has the potential to be one of the leading renewable natural-gas production regions,” said Ryan Childress, Dominion’s director of gas business development.

Duke Energy Corp. says it has a five-year plan to be a leader in renewable natural gas. Chevron Corp. has committed more than $200 million. Williams Cos. Chief Executive Alan Armstrong told investors that the firm, which carries nearly one-third of all U.S. gas in its pipelines, is positioned to swap out fossil fuels to reduce emissions.

King of Prussia, Pa.’s UGI Corp. sold its stake in a coal-fired power plant across the state. It bought a business that trades in California’s renewable-gas credit markets and invested in an Idaho dairy-gas project. UGI executive David Lindenmuth told an online biogas conference this month that the gas-distribution firm is following the lead of its European businesses.