The two-time defending MLS champions got one goal from Magee in the first half and two more in the second half. Magee volleyed home a deflected cross in the 38th minute, scored from Robbie Keane's feed in the 68th, and knocked in a rebound in the 74th.
It was the Chicago-born Magee's first career hat trick and second multigoal game in 11 MLS seasons.
Irish striker Keane scored the finale on an 80th-minute corner kick.
The Galaxy, transitioning to a new style of attack after Beckham's departure to French club Paris Saint-Germain, dictated most of the action in a game played largely between the 18-yard boxes.