Agassi, who has said he will retire after the U.S. Open starting on Aug. 28, lost his quarter-final match with Chile's Fernando Gonzalez, going out 6-4, 3-6, 7-5.
Roddick, the world number 10 and highest-ranked player in the draw, was forced to pull out of the hard court event because of a muscle strain on his left side.
The 2003 U.S. Open champion incurred the injury in his second-round match with fellow American Scott Oudsema on Thursday.
Hours before the start of his quarter-final, he consulted with his trainer Doug Spreen and new coach Jimmy Connors before deciding to withdraw from the tournament and avoid further injury.
Russian eight seed Dmitry Tursunov, who had been scheduled to meet Roddick in the last eight, gets a bye into the last four where he will take on Gonzalez.
Germany's Tommy Haas, the 2004 champion, eased through his quarter-final match with American Paul Goldstein 6-3 6-4 and will meet either Slovakia's Dominik Hrbaty or American Robby Ginepri in the semis.
Seventh-seeded Hrbaty and fourth seed Ginepri were playing in Friday's late match.
Roddick, who reached the final of last week's RCA Championships in Indianapolis before losing 4-6, 6-4, 7-6 to Davis Cup team mate James
OWN TERMS
"You always want to finish a tournament on your terms and not pull out with an injury," the 23-year-old said in a statement. "It's really disappointing.
"Last night I had trouble taking my socks off after the match. I literally couldn't bend over at all. There's improvement, but certainly not enough to even consider playing."
Agassi, in the 60th and final title defence of his glittering career, saved three match points against the expansive strokeplay of Gonzalez in the 10th game of the deciding set before being broken for the third time in the 12th.
"It was a disappointing loss for sure but Fernando did so many things well," the fifth seed said.
"He just stepped it up and was hitting it really big. He played some spectacular points to get it over the line finally. It was an uphill battle but he hung in there."
The 36-year-old received a standing ovation in the Los Angeles Tennis Center before bowing gracefully to the crowd on all four sides.
"I don't think you ever really prepare yourself for the emotions," the Las Vegas native said.
"It's not just saying goodbye to something I've done for 20 years but also saying goodbye to so many people who have been so good to me over the years. I'll miss it dearly."