His statement came after UN World Food Programme Executive Director David Beasley challenged Musk, Amazon founder Jeff Bezos and other billionaires in a CNN interview last week, calling on them to step up on "a one-time basis" to help end starvation.
In the interview, Beasley said billionaires could give "$US6 billion ($A8 billion) to help 42 million people that are literally going to die if we don't reach them."
"It's not complicated," he said.
That money would be approximately two per cent of Musk's fortune, nearly $US300 billion ($A400 billion), according to Forbes.
His wealth and the wealth of many American multi-billionaires has grown quickly during the COVID-19 pandemic, thanks to increased stock and home equity, even more than before the virus struck.
The SpaceX founder posted on Twitter on Sunday saying: "If WFP can describe on this Twitter thread exactly how $US6B will solve world hunger, I will sell Tesla stock right now and do it."
"But it must be open source accounting, so the public sees precisely how the money is spent," he added.
In 2020, the agency received $US8.4 billion ($A11.2 billion) in donations, which it says was $US5.3 billion ($A7.1 billion) short of its requirements. Its top donors include the United States, Germany and the United Kingdom.
Beasley responded to Musk on Twitter, writing $US6 billion ($A8.0 billion) will not solve world hunger, "but it WILL prevent geopolitical instability, mass migration and save 42 million people on the brink of starvation. An unprecedented crisis and a perfect storm due to Covid/conflict/climate crises."
He also offered to meet with Musk to discuss the topic.
"Please publish your current & proposed spending in detail so people can see exactly where money goes," Musk said in a Twitter reply. "Sunlight is a wonderful thing."
It remained unclear on Monday whether a meeting will be set.
AAP with The Project