Yao Ming was born and raised in Shanghai, China.
There's no reliable information that I could find about Yao's religious preferences, which is a pretty good indication that he doesn't have any to speak of. A little under half of the Chinese population does not associate with a religion, so that is definitely a good bet.
One fan claims that in this picture Yao is meditating before a game. That could possibly indicate an interest in Buddhism, or even Taoism. But he could also be praying. Or just concentrating really hard. And anyway, aren't all those things kind of the same in the end?
Let's just assume for now that he was just thinking about winning the game, and call him non-religious.
Yao for President!
In what is apparently not an uncommon move for celebrities in China, Yao Ming has decided to enter into politics. In early 2012, he joined the Chinese People's Political Consultative Conference (CPPCC) as its youngest member. A spokesman for the former basketball star said,
Yao wants to use his influence to do good deeds for society, but not to seek a political position.
And he seems to take it pretty seriously. Or at least more seriously than some of his fellow committee members. (Check out this picture.) The purpose of the CPPCC is supposedly to advise the Communist Party on issues affecting a wide diversity of groups, but in reality it doesn't have all that much power.
Perhpas Yao can be more effective in influencing change outside the political realm. He has helped raised money for education for China's poorest children, and he's thrown his celebrity behind several environmental causes. He participated in a film meant to bring awareness to endangered African rhinoceroses and elephants, and he has joined with the organization WildAid to urge the Chinese government to ban the sale of shark fins from several endangered shark populations, which are the essential ingredient in the popular Chinese dish, shark fin soup.
Whichever form it takes, it looks like Yao Ming is out to use his celebrity to make positive change in China.