Chinese tech billionaire Jack Ma is getting ready to leave his role at Alibaba.

He told Bloomberg he is dedicating more time and money to building his philanthropic foundation for education.

The move mirrors that of Bill Gates before he left Microsoft.

It's not clear exactly when Ma will leave Alibaba.

Ma is currently the chairman and co-founder of the e-commerce giant. He was CEO until 2013.

Jack Ma, one of the richest people in China, is getting ready to quit his job as chairman of Alibaba.

Ma, who co-founded the e-commerce conglomerate, is dedicating more of his time and money to building his philanthropic foundation, the 53-year-old billionaire told Bloomberg on Thursday.

The Jack Ma Foundation, which was founded in 2014, is chiefly dedicated to improving China's education system, particularly in rural areas. Last year it pledged 300 milion yuan ($45 million) to fund teacher training programs over the next decade, with a goal to end poverty in rural areas.

Ma, who worked as an English teacher before founding Alibaba, also told Bloomberg: "I think some day, and soon, I'll go back to teaching. This is something I think I can do much better than being CEO of Alibaba."

He declined to say when exactly he would retire. When Bloomberg asked whether it could happen this year, Ma shrugged and said: "You'll know very soon. I've prepared a Jack Ma Foundation. All these things that I've been preparing for 10 years."

Watch him discuss his plans here:

The move mirrors that of fellow billionaire Bill Gates, who founded his own philanthropic foundation in 2000, six years before leaving his role as Microsoft CEO.

Gates and his wife, who run the Bill & Melinda Gates Foundation dedicated to healthcare and poverty, were named the most generous philanthropists in the US last month.

Ma told Bloomberg: "There's a lot of things I can learn from Bill Gates. I can never be as rich, but one thing I can do better is to retire earlier."

Alibaba Group Chairman Jack Ma smiles on the "Singles' Day" global online shopping festival in Shenzhen, southern China's Guangdong province Friday, Nov. 11, 2016. AP / Kin Cheung

Alibaba is the largest e-commerce company in China, with a portfolio ranging from online shopping to cloud computing to food delivery. It reported a total revenue of 158 billion ($23 billion) last fiscal year.

Ma stepped down as Alibaba's CEO in 2013 but retained a role as executive chairman and a stake in the company.

He currently has a net worth of about $39 billion, Forbes estimated, making him the second-richest person in China and the 20th-richest in the world.

He has proven himself to be an eccentric billionaire as well. Last year he danced on stage in a Michael Jackson costume at a company party and starred in his own kung fu movie, where he defeated eight celebrity martial artists with the power of tai chi.

Ma's Bloomberg interview came as shares of China's second-largest e-commerce company, JD.com, plummeted as its CEO Li Qiangdong was arrested in the US over an accusation of rape.