The $2 billion Tesla Inc factory started delivering cars in just 357 days, a record for global automakers in China. The first 10 customers from the public received their China-made Model 3 sedans on Tuesday.
Billionaire CEO Musk danced enthusiastically on stage at the event, then stripped off his jacket and flung it aside to reveal a T-shirt with a cartoon of the factory. In a tweet, he labeled the video "NSFW" - not safe for work.
He predicted that "ultimately Tesla Model Y will have more demand than probably all the other cars of Tesla combined", with his voice cracking with emotion at times while talking about the progress of the Shanghai factory.
Musk's tweet of him dancing was viewed 2.5 million times and drew unflattering comparisons to famous Silicon Valley footage of Microsoft chiefs Bill Gates and Steve Ballmer dancing awkwardly at a 1990s Windows launch.
"Admit it Elon, you did it for the memes," one user tweeted here along with a picture of Musk stripping off his jacket. "I see you learned your dance moves at Dad school," said another.