The Tesla and SpaceX entrepreneur applauded the country’s success as he responded to a Twitter post by state media outlet Xinhua News featuring a speech by China’s president, Xi Jinping.
“The economic prosperity that China has achieved is truly amazing, especially in infrastructure! I encourage people to visit and see for themselves,” tweeted Mr Musk.
His electric car company is now producing cars at its Shanghai Gigafactory, but has faced a string of issues with the Chinese authorities.
Last month nearly all Chinese-made Teslas were recalled by regulators over concerns with the cruise control system.
Tesla owners in the country have also complained about problems with their cars and there were protests in April at a car show in Shanghai.
This is far from the first highly complimentary comment Mr Musk has made towards China.
Last July he took shots at some Americans for being complacent, while praising the Chinese work-ethic.
“China rocks in my opinion. The energy in China is great,” he said on a podcast.
“When you’ve been winning for too long you sort of take things for granted. The United States, and especially like California and New York, you’ve been winning for too long.”
And in March he told Chinese state TV that the country would become the “biggest economy in the world” and his company’s most important car market.
In June, Tesla opened a new data centre in mainland China to handle data it collects from cars sold in the country.
It was seen as a response by the company to questions about if its vehicles and the cameras that they have installed in them could be used for spying.
Mr Musk has said that his company would be “shut down” if the cars were ever used for spying, amid reports the Chinese military has banned them from their bases.