Alan Gordon gave San Jose hope in the 82nd minute when he put away a miss-hit shot from Justin Morrow for his first career playoff goal. But the Earthquakes could not find the equalizer they needed to force overtime.
San Jose won Sunday's first leg, 1-0 at Los Angeles, thanks to Victor Bernardez's 94th-minute free kick. But with Bernardez forced out because of an injury in the 12th minute Wednesday, the Earthquakes' makeshift defense couldn't hold on.
The win kept alive the Galaxy's hopes of repeating as MLS Cup champions for a second consecutive season. They will face Real Salt Lake or Seattle in the Western Conference finals.
San Jose, which came in 3-0-1 against LA this season, lost at Buck Shaw stadium since Aug. 13, 2011, breaking an unbeaten streak of 18 MLS matches.
Keane worked through San Jose's midfield and knocked a 22-yard shot off the post in the 21st minute.
The Irish international star slipped in behind San Jose's scattered backline on a 34th-minute counterattack, collected a through ball from Landon Donovan and went around Earthquakes goalkeeper Jon Busch before scoring.
Magee delivered the insurance goal in the 39th minute, making an unmarked run to 12 yards and one-timing a pass from Donovan.
Earthquakes defender Ike Opara had a clear shot from 9 yards in second-half injury time, but he pushed it off the post.
It was a similar result to 2005, when the Galaxy also prevailed in the playoffs' first round against a San Jose team that won the Supporters' Shield.
The Galaxy, held without a shot through 66 minutes in the first game, quickly took advantage in this one.
San Jose had several first-half chances, but the usually sure-finishing club which scored a franchise-record 72 goals in the regular season simply couldn't convert. That included a 26th-minute miss by Earthquakes star Chris Wondolowski, whose shot went over the crossbar from 9 yards out.
Wondolowski, who tied the league's all-time single-season scoring record with 27 goals this season, went scoreless in the playoffs.