Matthews broke the 1,000-yard mark for the season with 90 yards on 26 carries, scoring on runs of 1 and 3 yards for the Chargers (7-7), who joined Oakland in second place in the AFC West, one game behind Denver.
Phillip Rivers completed 17-of-23 passes for 270 yards, a touchdown and no interceptions as San Diego notched its third straight win.
Malcolm Floyd made five grabs for 96 yards and a score, and Vincent Jackson added three catches for 84 yards.
Baltimore's Joe Flacco went 23-of-34 through the air for 226 yards, two touchdowns and two interceptions. He was sacked five times.
The playoff-bound Ravens (10-4) fell to 3-4 on the road.
Notable deaths of 2014 [PHOTOS]