With England coach Steve McClaren watching, Beckham scored two goals and helped set up three others in 83 minutes of a 10-4 rout of Australian actor LaPaglia's Hollywood United. McClaren is trying to determine if Beckham is fit enough to rejoin the national team.
The game also was the last for Galaxy coach Frank Yallop, who announced his resignation to the players afterward, Beckham said.
The 83 minutes was the most that Beckham played since joining the Galaxy in July.
Among those playing for Hollywood United were former players Jorge Campos, Frank LeBoeuf and Eric Wynalda, Galaxy General Manager Alexi Lalas, Def Leppard guitarist Viv Campbell and LaPaglia, who started in goal.
Campos played in two World Cups for Mexico and LeBoeuf, started for France's 1998 World Cup victors.
Edson Buddle scored three goals for the Galaxy. LeBoeuf scored twice for Hollywood United.