Bitcoin enthusiasts prize the cryptocurrency as beyond the reach of any government. Yet up to three-quarters of the world’s supply has been produced in just one country, China, where a government push to curtail output is now causing global bitcoin turbulence.

The amount of electricity needed to power vast numbers of computers used to create new bitcoin are at odds with China’s recent climate goals. The government, which manages its national currency with a tight fist, also frowns on cryptocurrency generally. No legal exchange of bitcoin has been permitted for years in China, even as the nation’s entrepreneurs emerged as the dominant source of its output.

Few governments have embraced bitcoin, but fallout from Beijing’s threats demonstrated how its grip on production left the cryptocurrency vulnerable.

The 24/7 number crunching required to create, or “mine,” bitcoin relies on ample supplies of cheap electricity and equipment, some of the same elements China harnessed to become the world’s manufacturing hub.

In their hunger for market share, China’s bitcoin miners took advantage of an underregulated and overbuilt electricity-generating sector. They set up mining operations adjacent to hydropower producers in the mountainous Sichuan and Yunnan provinces where turbines churn snowmelt and seasonal downpours into electricity. When river flows eased each winter, miners packed their computers and headed north to coal-rich Xinjiang and Inner Mongolia.

Chinese bitcoin-production operations aren’t as dirty as actual mines, but one consultant notes that they don’t resemble the ultra-hygienic space-age environments of science fiction, either: ‘In the movies they are more clean and presentable.’

Chinese bitcoin-production operations aren’t as dirty as actual mines, but one consultant notes that they don’t resemble the ultra-hygienic space-age environments of science fiction, either: ‘In the movies they are more clean and presentable.’

Photo: Paul Ratje/The Washington Post/Getty Images

Mining operations in China, sometimes tens of thousands of computers wired together solving complex computational puzzles, gorge on electricity. The bitcoin industry alone is on track to rank among China’s 10 biggest power users, alongside sectors like steelmaking and cement production, according to a peer-reviewed paper published in April by Britain’s Nature Communications. That would make China’s bitcoin producers bigger consumers of energy than the entire nation of Italy.

That ravenous appetite has put bitcoin mining in conflict with Beijing’s political priorities. President Xi Jinping is determined to recast China as a climate champion and has set ambitious goals to reduce coal use. Beijing is also about to launch a national digital currency, controlled by the central bank and designed to counter cryptocurrencies.

Chinese bitcoin production is reminiscent of the nation’s sway in other high-technology realms, from production of rare-earth mineral materials to video-surveillance equipment—with one main difference: Beijing’s distrust of cryptocurrencies.

On May 21, China’s government vowed to “crack down on bitcoin mining and trading behavior,” a statement widely interpreted as a warning that the cryptocurrency’s multibillion-dollar supply chain’s days are numbered.

In response, electricity producers are ejecting miners from grids and Chinese dealers are unloading computers designed to create bitcoin onto the secondhand market at huge discounts.

Shuffling production

None of this means the world will run out of bitcoin. Instead, mining is likely to slow in China and accelerate elsewhere. Miners in other nations had already cut into China’s production dominance in the past 18 months or so, according to University of Cambridge figures, which estimated the U.S. share has been growing and accounted for around 7% last year.

But even amid some industry expectations that the U.S. share could expand to perhaps 40% in the next few years, the bitcoin community had believed China would retain nearly half of mining.

“In China, it’s always been the thinking that the government will crack down,” said Nishant Sharma, founding partner at Beijing advisory firm BlocksBridge Consulting Ltd.

Still, he said: “I’m seeing so much panic.”

Worries of disruption from the China upheaval have weighed on bitcoin’s price, along with news last month that Elon Musk’s car maker Tesla Inc. had stopped accepting it as payment, also because of environmental concerns.

Early entrants

Bitcoin’s history in China owes much to an earthquake that shook southwestern Sichuan province in 2013. Among millions of donations that flowed into charities in the aftermath, some stood out: gifts of bitcoin to a foundation of Jet Li, the Chinese action star.

The resulting buzz about bitcoin intrigued a Shanghai telephone-company worker, Jiang Zhuoer, who that winter bought two computers and started mining at home. His setup was quickly generating $500 to $700 monthly and also warmed his apartment, he recalled in an interview.

Also that year, a team of technology enthusiasts in Beijing began designing computers specifically for creating new bitcoin. Their enterprise, Bitmain Technologies Ltd., used parameters published by bitcoin’s unidentified architect, which one of them translated into Chinese.

Chinese companies such as Bitmain have established a lucrative niche in selling specialized bitcoin-mining computers.

Chinese companies such as Bitmain have established a lucrative niche in selling specialized bitcoin-mining computers.

Photo: Artyom Geodakyan/TASS/Getty Images

Chinese regulators—chastened by a pattern of financial manias, and the busts that inevitably followed—telegraphed anxiety. The government’s state-controlled news agency, Xinhua, dubbed bitcoin “no more than privately manufactured money circulating on the internet.”

Eight months after the Jet Li donations, regulators torpedoed any notion the trendy asset was welcome in China’s financial system. Led by the People’s Bank of China, Beijing forbade the country’s banks from handling cryptocurrency.

Beijing tightened the screws again in 2017 by banning various uses for cryptocurrency, including trading it online.

Chinese authorities, however, set no specific policy on the output of bitcoin, so enthusiasts kept mining away.

Inspired by back-of-the-envelope calculations on profits, instead of technical knowledge, small-town real-estate tycoons and factory owners reconstituted cheap warehouses as data farms, snapping up electronics from Shenzhen and stacking computer servers onto crude racks alongside loud cooling fans.

“In the movies they are more clean and presentable,” said BlocksBridge’s Mr. Sharma. “In China they aren’t so clean and the jungle of wires is worse.”

Because cryptocurrency mining involves solving increasingly difficult math problems, every new unit of the crypto requires more computing time—and energy—than the one mined before it. That means the earliest and most aggressive producers had a huge advantage.

Bitcoin was manna for owners of power plants, often regional governments in wayward places that had expanded generating capacity based on flimsy projections of industrial demand.

Revenue-hungry electricity producers promoted themselves as big data centers, like Sichuan’s Aer III Hydropower Station located on the Tibetan Plateau, which in 2019 began hosting 1,750 bitcoin mining machines on its grounds. Miners sometimes stole electricity, including one who was convicted for rerouting power lines to take electricity worth $125,000 in a half year to run his over 400 bitcoin machines. He was sentenced in 2019 to 11 ½ years’ prison time by a court in northern Liaoning province.

Some of China’s biggest winners focused on servicing miners—a model followed in the mid-1800s by Levi Strauss, who got rich outfitting prospectors in California’s gold rush.

Bitmain, for instance, emerged as the world’s leading producer of mining computers by developing microchips optimized to handle the equations that create the cryptocurrency. Shanghai wealth-tracking service Hurun Report has crowned as billionaires three of Bitmain’s top shareholders, including 42-year-old Zhan Ketuan with an estimated net worth above $15 billion.

The telephone company worker-turned-miner, Mr. Jiang, is now chief executive of megaminer BTC.Top, a pool of 400,000 machines. The 36-year-old says Beijing’s latest directives could herald a return to smaller-scale data centers and decentralized output, and he is considering exporting some equipment to North America or Central Asia.

SHARE YOUR THOUGHTS

How might a shift toward the U.S. for bitcoin mining affect American climate goals? Join the conversation below.

Proponents of the industry in the West say mining is shedding its cowboy image and that momentum is shifting toward nations with more predictable regulatory regimes, especially the U.S. The Internal Revenue Service has set cryptocurrency policies, American banks are offering custodian services for bitcoin and utilities are beckoning miners to natural gas-powered electricity plants in upstate New York and solar farms in Texas.

Beijing’s crackdown should improve the currency’s prospects long-term by reducing market “fear, uncertainty and doubt that China is mining all the bitcoin,” says Sue Ennis, head of corporate development at Toronto-based cryptocurrency firm Hut 8 Mining Corp. “Everyone who is not in China looks at this as an opportunity to capture a greater piece of the pie,” she said, noting her firm is adding extra capacity to host any miners eager to exit China.

In one of Bitmain’s largest overseas orders to date, Las Vegas-based Marathon Digital Holdings Inc. ordered 70,000 machines that it is installing at bitcoin farms in Hardin, Mont., and Big Spring, Texas.

Before now, bitcoin mining’s mantra has been, “what’s the cost to produce in China, and what’s the risk?” says Marathon’s CEO, Fred Thiel. Now, with the crackdown under way, he says, the risk has become evident.

—Liyan Qi and Elaine Yu contributed to this article.

Write to James T. Areddy at james.areddy@wsj.com

Corrections & Amplifications
Levi Strauss got rich outfitting prospectors in California’s gold rush in the mid-1800s. An earlier version of this article incorrectly referred to the period as the 1880s. (Corrected on June 5)