Around 1,000 protesters, many waving Republican flags with three horizontal stripes of red, purple, yellow, blocked traffic as they made their way to the Puerta del Sol, a central square in the capital.
The demonstration was timed to coincide with the 83rd anniversary of the establishment of Spain's last democratically-elected republic, which was overthrown by an army uprising that led to Spain's 1936–39 civil war and the 36-year military dictatorship of General Francisco Franco.
Franco appointed then Prince Juan Carlos as his successor as head of state, a job the royal took over as king upon the dictator's death in 1975.
Roberto Clemente, a 19-year-old high school student, said he came to the protest because he was against having "a king imposed by Franco".
"What would be more coherent in the 21st century would be to have a democracy without a monarchy," he added.
Juan Carlos, 76, is widely respected for his role in Spain's transition to democracy after Franco's death, with many hailing his role in getting the participants in an attempted military coup in February 1981 to stand down peacefully as a highlight in his career.
But the monarchy's popularity has plunged over the past two years largely due to a luxury elephant-hunting trip the king made to Africa in 2012 during Spain's financial crisis and a corruption scandal involving his youngest daughter Cristina.
Pedro Riquelme, a 55-year-old industrial worker, said he was at the protest because the monarchy was "a corrupt system that leads us to poverty".
"It is like a property that they pass from father to son. With a republic everything would be more transparent," he said.
Princess Cristina, 48, was named as an official suspect in an investigation into alleged fraudulent business dealings by her husband, former Olympic handball player Iñaki Urdangarin.
She was grilled for over six hours in court in February as part of the probe over allegations she was complicit in tax-dodging and money laundering.
Cristina's court summons was a first for a member of the king's immediate family.
Less than half of all Spaniards, 49.9 percent, support the monarchy as an institution, according to the poll published in daily newspaper El Mundo in January.