Donovan, who signed a multi-year extension with the Galaxy this week, scored his 132nd career MLS goal in the 26th minute for a 1-0 lead.
Keane followed with goals in the 43rd and 67th minutes for his 11th and 12th scores of the year as the Galaxy (13-9-4) strengthened their hold on second place in the Western Conference.
The Earthquake fell to 9-11-7.
Megyn Kelly: Santa Claus and Jesus are both white men
Penelope Cruz named 2013's 'Best Body' by Fitness magazine