SHOUYANG, China — Jin Peisheng, a drilling rig foreman, knows the challenges of trying to extract natural gas from a coal seam under the cornfields here in north-central China.

Cracks in the subterranean coal are flooded with water that needs to be pumped out before the gas will emerge. The coal seams are so cold that gels injected into the well, which are meant to help release the gas, sometimes become gummy and block the flow instead. And there is constant concern about hitting the labyrinths of active coal mines that honeycomb the area.

“The big uncertainty is what’s underground — if there’s a tunnel, that’s a big danger. It would be dangerous for the miners,” Mr. Jin said.

Faced with severe air pollution from coal and a rising dependence on energy imports, China has been eager to follow the United States by rapidly increasing natural gas output. Replacing coal with natural gas has also been central to Beijing’s hopes to limit emissions of global warming gases in China, the world’s largest producer of carbon dioxide by a wide margin.