The billionaire made the comments during a Q&A at the World Internet Conference, hosted by the Cyberspace Administration of China.
Musk said: "My frank observation is that China spends a lot of resources and efforts applying the latest digital technologies in different industries, including the automobile industry, making China a global leader in digitalisation.
"Tesla will continue to expand our investment and R&D efforts in China."
The firm has previously faced negative headlines in the Asian country as well as scrutiny around its privacy while the use of Tesla's electric vehicles has reportedly been restricted by Beijing but Musk discussed the issue of data protection in his speech.
He said: "Tesla has set up a data centre in China to localise all data generated from our business here, including production, sales, service and charging. All personally identifiable information is security stores in China without being transferred overseas. Only in very rare cases, for example, spare parts orders from overseas is data approved for transfer internationally."
Musk was recently complimentary of China and described it as a "global leader in digitalisation" and hailed Chinese car manufacturers as the "most competitive in the world".