Ibrahimovic joined Juventus forward Cristiano Ronaldo and Barcelona's Lionel Messi as the third active player to score 500 goals between club and country during the Galaxy's 5-3 loss to Toronto in MLS.
The 36 year-old striker celebrated the milestone thanks to an outrageous roundhouse finish – Ibrahimovic spinning and volleying with the outside of his foot in the first half.
Former Galaxy captain Beckham, who played alongside Ibrahimovic at French champions Paris Saint-Germain, heaped praise on Sweden's all-time leading scorer.
"Zlatan, I want to say congratulations," Beckham said in a video shared by Galaxy. "500 goals. What a career, what a player, what an achievement. Pleasure to play with you and against you. Pleasure to be your friend.
"500 goals… that makes you really, really old. But on a serious note, congratulations mate.
"One thing you need to work on. You're a little bit shy. So, work on it. You'll get better. Congratulations mate. Incredible."
After starting his career at Malmo (18) in Sweden, Ibrahimovic has scored goals for Dutch giant Ajax (48), Juventus (26), Inter (66), Barcelona (22), AC Milan (56), Paris Saint-Germain and Manchester United (29).
Ibrahimovic was PSG's top goalscorer with 156 goals before Edinson Cavani broke his record in January.