In order to prevent Mr. Musk and his political action group, America PAC, from distributing the money, a judge in Philadelphia, Pennsylvania, has ordered the CEOs of Tesla and X to respond to a civil case brought by the city’s top prosecutor.
According to the lawsuit, Mr. Musk is accused of running an unlawful lottery and attempting to sway votes in the presidential election between Donald Trump and Kamala Harris next week.
The Republican nominee, Mr. Trump, is being supported by Mr. Musk and his PAC.
The controversial businessman pledged to provide $1 million (£772,000) every day to voters who signed his online petition in swing states.
On October 19, a guy by the name of John Dreher received the first $1 million at a campaign event in Pennsylvania.
As they compete for the state’s 19 electoral votes, Mr. Trump and Ms. Harris have both visited the state numerous times.
According to Forbes, Mr. Musk is the richest person in the world, with a net worth of $274 billion (£210 billion). The $17 million (£13 million) that he has pledged to donate is a very small portion of his wealth.
Up until the middle of October, the 53-year-old had given $75 million (£58 million) to American PAC.