Houston's Yao collected 2.558 million votes, the most ever, in balloting by fans around the world while Miami's O'Neal received 2.488 million votes, which also eclipsed the previous highest mark.
Yao will be joined in the Western Conference starting lineup by forwards Tim Duncan of San Antonio and Kevin Garnett of Minnesota and guards Kobe Bryant of the Los Angeles Lakers and Tracy McGrady of Houston.
O'Neal will be joined by forwards Vince Carter of New Jersey and Grant Hill of Orlando and guards Allen Iverson of Philadelphia and LeBron James of Cleveland on the Eastern Conference team.
O'Neal will be appearing in his 12th All Star Game, while James is making his debut in the game on February 20.
The 30 head coaches of the NBA's franchises will select the remaining seven members of each side. Their picks will be named on February 8.
More from rediff