Anderson did not comment as he was released from prison shortly after the indictment was handed up, but his attorney, Mark Geragos, said the trainer didn't cooperate with the grand jury.
"This indictment came out of left field," Geragos said. "Frankly, I'm aghast. It looks like the government misled me and Greg as well, saying this case couldn't go forward without him."
Bonds is scheduled to appear in U.S. District Court in San Francisco on Dec. 7.
Bonds, who surpassed Aaron's career home run mark of 755 on Aug. 7, finished the season with 762. A seven-time NL MVP, he also holds the season record with 73 home runs in 2001.
He is a free agent after being told late in the season that the San Francisco Giants didn't want him back next year.
Defense attorney Mike Rains said he spoke briefly with Bonds but did not describe his reaction. At an evening news conference, he read a statement accusing federal prosecutors of "unethical misconduct" and declined to take questions.
"Every American should worry about a Justice Department that doesn't know if waterboarding is torture and can't tell the difference between prosecution on the one hand and persecution on the other," Rains said.
The indictment charges Bonds with lying when he said he didn't knowingly take steroids given to him by Anderson. Bonds is also charged with lying that Anderson never injected him with steroids.
"Greg wouldn't do that," Bonds testified in December 2003 when asked if Anderson ever gave him any drugs that needed to be injected. "He knows I'm against that stuff."
Prosecutors promised Bonds they wouldn't charge him with any drug-related counts if he testified truthfully. But according to the indictment, Bonds repeatedly denied taking any steroids or performance-enhancing drugs despite evidence to the contrary.
For instance, investigators seized a so-called "doping calendar" labeled "BB" during a raid of Anderson's house.
"He could know other BBs," Bonds replied when shown the calendar during his testimony.
Asked directly if Anderson supplied him with steroids, Bonds answered: "Not that I know of." Bonds even denied taking steroids when he was shown documents revealing a positive steroids test for a player named Barry B.
"I've never seen these documents," Bonds said. "I've never seen these papers."
The indictment does not explain where prosecutors obtained those results, but may have been seized when federal agents raided BALCO in September 2003.
At the end of the 2003 season, Bonds said, Anderson rubbed some cream on his arm that the trainer said would help him recover. Anderson also gave him something he called "flax seed oil," Bonds said.
Bonds then testified that prior to the 2003 season, he never took anything supplied by Anderson — which the indictment alleges was a lie because the doping calendars seized from Anderson's house were dated 2001.
Bonds has long been shadowed by allegations that he used performance-enhancing drugs. The son of former big league star Bobby Bonds, Barry broke into the majors with the Pittsburgh Pirates in 1986 as a lithe, base-stealing outfielder.
By the late 1990s, he'd bulked up to more than 240 pounds — his head, in particular, becoming noticeably bigger. His physical growth was accompanied by a remarkable power surge.
He joins a parade of defendants tied to the BALCO investigation, including Anderson, who served three months in prison and three months of home detention after pleading guilty to steroid distribution and money laundering.
BALCO founder Victor Conte also served three months in prison after he pleaded guilty to steroids distribution.
Bonds is by far the highest-profile figure caught up in the steroids probe, which also ensnared track star Marion Jones. She pleaded guilty in October to lying to federal investigators about using steroids and faces up to six months in prison.
Former Senate Majority Leader George Mitchell, who is investigating drug use in baseball, declined to comment, but the Giants, the players' union, even the White House called it a sad day for baseball.
"These are serious charges," the Giants said. "Now that the judicial process has begun, we look forward to this matter being resolved in a court of law."
In Washington, White House spokesman Tony Fratto said: "The president is very disappointed to hear this. As this case is now in the criminal justice system, we will refrain from any further specific comments about it. But clearly this is a sad day for baseball."
Commissioner Bud Selig withheld judgment, saying, "I take this indictment very seriously and will follow its progress closely."