Lewis said he took an over-the-counter supplement - which he declined to identify - at the end of last season and said he did not believe it contained a banned substance.
Lewis is an 11-year veteran who missed the last three games of the regular season with knee tendinitis. He played in all of the Magic's postseason games and was the team's second-leading scorer as it advanced to the N.B.A. finals, where it lost to the Los Angeles Lakers.
Unlike Major League Baseball and the N.F.L., which have been battered over the years by disclosures that their players used banned substances, the N.B.A. has been largely unscathed. League officials on Thursday would not release the names of those players who have been suspended for violating the sport's policies on performance-enhancing drugs, but news media reports show that a handful have been suspended since 1999.
In a written statement, Lewis said he took responsibility for his positive test and apologized to his teammates and fans for "not doing the research that should come with good judgment" in regards to the supplement he said he had ingested.
Gary Wadler, an internist and a member of the World Anti-Doping Agency, said that elevated levels of testosterone can be caused by ingesting or injecting a substance, which helps build muscle mass and improves recovery time. Elevated levels of testosterone can also be caused by the substance DHEA, which is often found in supplements, Wadler said.
The supplement industry has come under increased scrutiny from federal authorities. The Food and Drug Administration warned consumers on July 29 not to use body-building products that are sold as over-the-counter nutritional supplements because they may contain steroids or steroid-like substances. The warning came five days after federal agents searched several locations tied to the company American Cellular Labs, which the authorities said sells supplements that contain designer steroids.
"I hope this unintentional mistake will not reflect poorly on our team and its great character," Lewis said. "I hope every athlete can learn from my mistake that supplements, no matter how innocent they seem, should only be taken after consulting an expert in the field."
The N.B.A.'s policy on performance-enhancing drugs is much less stringent that the policies in baseball and the N.F.L. There is no testing out of season, when antidoping experts believe players most benefit from using the substances. The 10-game suspension for a first positive test in the N.B.A. is a little less than an eighth of the season. A first positive in baseball results in a 50-game suspension (about a third of the season) and a first positive in football results in a 4-game suspension (a quarter of the season).
Lewis will be docked about $1.6 million of his $18 million salary for the 2009-10 season, The Associated Press said.
"When you do something stupid and what you think is harmless, you feel bad about it, because you're letting your team and your organization down," said Otis Smith, the Magic's general manager.
He added: "It's 10 games. A silver lining is we'll get to see some of our other guys play. We're fortunate it's not more than 10 games. We'll miss him, but we'll see more of our bench."
Travis Tygart, the chief of the United States Anti-Doping Agency, which oversees the drug testing of Olympic athletes, and an ardent critic of the supplement industry, said: "There is a significant portion of the supplement industry that is profiting off the backs of our athletes and compromising the integrity of our national sports. The system needs to change to better protect all consumers."