Reports said more than 1,000 anti-fascists gathered to protest the far-right meeting in Tirso de Molina, a few hundred metres from Madrid's main square, after local authorities sanctioned the rally.
Posters had been pasted on walls in the area earlier in the week warning of a racist demonstration.
Protesters, joined immigrants, blocked roads leading down into Lavapies, an area with a large African and Chinese populations.
Demonstrators chanted "You shall not pass," and "Brother Carlos, we will not forget you", referring to 16-year-old Carlos Javier Palomino, an anti-racist protester who was stabbed and killed during a confrontation with rival groups in November.
A spokesman for Madrid's ambulance service said nobody had been injured. One media source said a protester had been blinded in one eye.
Anti-fascist protesters also threw bricks through the windows of several banks and smashed up offices inside, eyewitnesses said.
The number of immigrants living in Spain has increased fivefold in the last 10 years and now account for nine per cent of Spain's 45 million people.
The opposition Popular Party calls immigration a "problem" and proposes measures to compel immigrants to integrate, including restricting the use of Islamic headscarves.
The ruling Socialist party has dismissed the Popular Party proposals as xenophobic.