Richard (10-12) notched his third win in four starts, stifling the Giants on five hits. The left-hander didn't issue a walk and struck out one while placing 71 of his 111 pitches for strikes.
Maybin's two-run single in the first inning set the tone, staking the Padres to a 3-0 lead, and the San Diego center fielder added another run-scoring hit in the fifth, finishing 4-for-5.
Everth Cabrera added three hits, including a two-run double, and Will Venable went 3-for-4 with an RBI as the Padres avoided a three-game sweep.
San Francisco's Ryan Vogelsong (10-7) lasted just three innings, giving up three runs on eight hits.
Hunter Pence drove in the only run for the Giants, who fell into second place in the National League West, one-half-game behind the Los Angeles Dodgers.