The towering 2.29m (7ft 6in) star made the announcement during a press conference in his hometown of Shanghai after his last two seasons with the Houston Rockets were dogged by injuries.[break]
Yao, 30, joined the team as the first pick in the 2002 NBA draft but there was scepticism about whether the signature product of China´s massive state sports system would ever earn the affection of the league´s fans.
But he won over Americans and became an adored national icon in China through his strong play -- when fit -- and his grace and poise in becoming the NBA´s first Asian superstar.
He exhibited that same grace during his retirement announcement, switching to English to offer a "special thanks" to the city of Houston.
"I would like to thank you for giving me a great nine-year career," he said.
"Nine years ago I came to Houston as a young, tall, skinny player and the entire city and team changed me into a grown man, not only a basketball player."
He enjoyed a high profile, but the rigours of top-flight basketball proved too much for his massive frame and his career has been marked by lengthy absences from the court due to a succession of mostly foot and leg injuries.
Nonetheless, he was China´s first global sports super star with a personal brand valued at more than $1 billion.
The eight-time NBA all-star routinely tops Forbes´ list of China´s most valuable celebrities and his international appeal has led to endorsement deals with Nike, Pepsi, McDonald´s and China Telecom.
But the brand he has done the most to promote is the NBA. China has become the league´s biggest market outside the US since he began playing with 300 million fans.
NBA China, the league´s China marketing company, is valued at about $2.3 billion.
Cricketer Vesawkar retires from international cricket