Elon Musk’s pledge to sell 10% of his Tesla Inc. stock highlights the complex financial web the world’s richest man has spun around his personal fortune.

Selling a stake valued at roughly $20 billion could provide Mr. Musk, who has at times said he was cash-poor, with a sizable liquidity infusion. It could also go a long way toward helping the billionaire pay a bill likely coming due from the Internal Revenue Service. Completing these moves before year-end would come with the benefit of helping Mr. Musk avoid a possible tax...

Elon Musk’s pledge to sell 10% of his Tesla Inc. stock highlights the complex financial web the world’s richest man has spun around his personal fortune.

Selling a stake valued at roughly $20 billion could provide Mr. Musk, who has at times said he was cash-poor, with a sizable liquidity infusion. It could also go a long way toward helping the billionaire pay a bill likely coming due from the Internal Revenue Service. Completing these moves before year-end would come with the benefit of helping Mr. Musk avoid a possible tax increase next year.

Mr. Musk is worth more than $300 billion on paper, according to the Bloomberg Billionaires Index, with the majority of that wealth tied up in Tesla and his rocket company, Space Exploration Technologies Corp. The Tesla chief executive, who is compensated in stock awards and doesn’t accept a cash salary from the electric-vehicle maker, faces an August deadline to convert roughly 22.9 million vested stock options into shares or let them expire worthless, according to a regulatory filing.

He would need about $143 million to exercise those options, and could owe more than $10 billion in federal income and Medicare taxes upon exercising them. Under California law, Mr. Musk also likely would face a sizable state tax burden because exercised options are treated as compensation partly earned in the state while he lived there.

That California tax likely would be due even though Mr. Musk said in late 2020 that he had moved to Texas, which doesn’t impose individual income or capital-gains taxes. He subsequently said Tesla was moving its headquarters to Austin, Texas, from Silicon Valley.

Mr. Musk didn’t respond to requests for comment about the details of his tax planning or when he plans to make good on his pledge to sell. Tesla didn’t respond to requests for comment.

The CEO, who travels frequently between California, Texas and elsewhere on a private jet, has at times made a show of some of his financial choices. Last year, he put several mansions he owned up for sale. “I am selling almost all physical possessions,” he tweeted at the time. “Will own no house.”

He has long borrowed to support his lifestyle, like many other wealthy individuals. More than half of Mr. Musk’s Tesla stock—or roughly 88 million shares, valued at more than $100 billion at recent prices—is pledged as collateral to secure personal debt, an August regulatory filing shows.

Several years ago, Mr. Musk’s younger brother, Kimbal Musk,

leaned on him for a loan.

“You do know that I don’t actually have cash, right?” Mr. Musk told his brother, court records show. “I have to borrow.”

Over the weekend, Mr. Musk took to Twitter to ask users there whether he should sell 10% of his Tesla stock. He framed the question in terms of a continuing debate about how some of America’s wealthiest individuals should be taxed.

Tesla intends to move its headquarters to Austin, Texas, according to CEO Elon Musk, who compared the current crowded operations at the factory in Fremont, Calif., to ‘Spam in a can.’ He said the electric-vehicle maker would continue expanding in California. Photo: Brendan Smialowski/AFP/Getty Images The Wall Street Journal Interactive Edition

“Much is made lately of unrealized gains being a means of tax avoidance, so I propose selling 10% of my Tesla stock,” he said as he launched the poll Saturday. Roughly 58% of respondents supported a sale, and Mr. Musk has said he would abide by the result.

Tesla shares were down roughly 14% this week, as of Tuesday afternoon. Through Friday, the stock had risen more than 70% in 2021, thanks in large part to a sharp increase in recent weeks that has cemented Mr. Musk’s place ahead of Amazon.com Inc. founder

Jeff Bezos at the top of the wealth rankings.

The tax hit that Mr. Musk faces likely would have come regardless of the political debate unfolding in Washington. Mr. Musk himself signaled at a September conference that he expected to exercise options in the fourth quarter, triggering what he called a huge tax liability.

He could seek to satisfy at least part of his commitment to sell Tesla stock—and pay any tax bills associated with exercising his options—by selling some of the roughly 170 million shares he already owns, which are valued around $200 billion.

But selling those older shares could come with a second significant tax cost, because he would owe tax on the difference between his relatively low purchase price and the current value.

He could, instead, pay the taxes by selling some of the shares he would obtain by exercising already vested options. His cost would be the value when he obtains them. The potential capital gains are likely to be much smaller if he sells them quickly before the price changes much.

‘There’s certainly good reason…to accelerate income. Someone of that wealth is going to face higher tax rates almost certainly next year.’

— Robert Willens, tax consultant

No matter which route he takes, he might want to move quickly. The current top tax rate on long-term capital gains is 23.8%, though Congress is poised to vote in the next few weeks on adding an 8% surtax on income above $25 million, starting in January. The potential for a surtax gives Mr. Musk and others who are considering whether to exercise options or sell appreciated assets an incentive to do so now. The tax difference between triggering roughly $26 billion of compensation this year as opposed to next year could be more than $2 billion.

“There’s certainly good reason…to accelerate income,” said New York-based tax consultant Robert Willens. “Someone of that wealth is going to face higher tax rates almost certainly next year.”

Mr. Musk has long been reluctant to sell Tesla shares, though he has done so to pay taxes.

Selling stock could weaken Mr. Musk’s control over Tesla. Companies such as Facebook parent Meta Platforms Inc. and Google parent Alphabet Inc. have multiple classes of shares, giving founders supervoting power over common shareholders. Tesla lacks such a structure.

A 10% stake sale would still leave Mr. Musk as Tesla’s largest shareholder. He currently holds more than 17% of Tesla stock, according to FactSet. U.S. financial company Vanguard Group, the No. 2 investor, holds less than 6% of Tesla’s stock, according to FactSet.

Billionaires have come under fire recently for paying relatively little tax, in part by relying on debt, rather than income, to cover living expenses.

Under current law, people who hold appreciated assets until death don’t have to pay capital-gains taxes on that increase in value. They might owe estate taxes, but their heirs have to pay capital-gains taxes only when they sell and only on gains since the prior owner’s death.

Mr. Musk previously criticized a proposed tax on billionaires that would have effectively prevented some wealthy Americans from being able to defer capital-gains taxes indefinitely.

The plan, which has since been dropped, would have applied to about 700 Americans and would have annually taxed unrealized gains on publicly traded assets.

Mr. Musk isn’t alone in looking to realize some financial gains as Tesla’s stock is near record highs. Other directors including Kimbal Musk and board chair Robyn Denholm have unloaded more than $600 million worth of shares year-to-date, according to data compiled by research firm Equilar Inc. Roughly $350 million of that has been sold in the past two weeks alone. Those values don’t reflect any possible cost of exercising options.

Write to Rebecca Elliott at rebecca.elliott@wsj.com, Richard Rubin at richard.rubin@wsj.com and Theo Francis at theo.francis@wsj.com