Beckham, whose wife Victoria and sons Brooklyn and Romeo were in the crowd at the Bernabeu, clashed with Deportivo's Lionel Scaloni a minute from time.
Scaloni reacted angrily to a Beckham challenge and as both men rolled around on the ground, players from the two teams became involved in a melee.
Words were also exchanged between Beckham and Aldo Duscher, the Argentinian who broke a bone in the England captain's left foot in a Champions League tie two seasons ago.
Beckham, who received a yellow card for his actions, said: "The referee told us to shake hands but he wouldn't for some reason. I don't know why, I had no problem shaking hands.
" I didn't know he was Argentinian. I've just found out. That's another one who doesn't like me!"
Despite the distractions Real Madrid held on for a 2-1 victory, with Raul scoring the winner five minutes from time.