Westbrook, who had nine yards in five carries all season, carried 23 times in his 21st career 100-yard game.
San Francisco (4-7), beaten at home by Tampa Bay 21-0 last week, improved to 3-1 since Troy Smith became starting quarterback and pulled within a game of co-leaders St. Louis and Seattle in the anemic NFC West.
Arizona (3-8), the two-time defending division champion, has not had a losing streak this bad since dropping eight in a row in 2006, Dennis Green's final season as coach.
Cardinals quarterback Derek Anderson struggled mightily, completing 16 of 35 passes for 196 yards and an interception. He finished with a passer rating of only 51.6.
Larry Fitzgerald had only four catches for 37 yards.
As bad as Anderson was, the running game was worse. Arizona managed just 13 yards on the ground, all of which came from Beanie Wells.