A tearful Jack Ma formally left Alibaba on Tuesday, donning a guitar and a rock star wig at an event for thousands of employees of the e-commerce giant he founded 20 years ago in a small shared apartment in Hangzhou city in eastern China.

Jack Ma performed on stage at his four-hour farewell party. Credit:AP

During a four-hour celebration at a stadium attended by around 60,000 employees, Alibaba's billionaire executive chairman delivered on his promise of a year ago to hand over to CEO Daniel Zhang.

Costumed performers, some dancing to dubstep music and dressed in traditional Chinese dress, and singers paid tribute to Ma's reputation for dressing up and performing at big events, entering to a parade of floats representing Alibaba divisions such as shopping site Tmall and payment service Ant Financial.

"After tonight I will start a new life. I do believe the world is good, there are so many opportunities, and I love excitement so much, which is why I will retire early," Ma told guests and employees.