An estimated 45,000 people packed into the capital's Plaza de Colon, many of them waving Spanish flags and signs reading "Stop Sanchez" and "For a united Spain, elections now!"
Former French prime minister Manuel Valls, who was born in Barcelona and is running for mayor of Spain's second largest city, and Peru's Mario Vargas Llosa, a Nobel Prize-winning author who became a Spanish citizen in the 1990s and has spoken out in favour of conservative Spanish causes, were among those who attended the Madrid protest.
Opposition leaders in Madrid are seeing Sanchez's proposal - to appoint a rapporteur for negotiations across political parties to address the situation in Catalonia - as treason, reports Sputnik.
Under the shadow of Colon Square's huge Spanish red and yellow flag, demonstrators bussed in from all over the country heard speakers call for the defence of Spanish unity.
"The time of Sanchez's government has ended", Popular Party leader Pablo Casado said at the protest.
Since his party holds about a quarter of the seats in Parliament, Sanchez relies on support from the Podemos party, Catalan nationalists and other small parties to pass laws.More news: Switzerland and United Kingdom complete post-Brexit trade deal
More news: Grammys 2019: Cardi B Performs At The 2019 Grammys
More news: US team in Beijing for trade talks
The government faces a key vote next Wednesday on its 2019 budget proposal, which will likely fail without the support of Catalan parties. That prompted an outcry from the opposition, which accused Sanchez of giving in to pressure from the separatists, whose votes he will need to pass a crucial budget plan next week.
The protests lasted two days and preceded the trial of 12 Catalan separatist leaders who were charged with rebellion and misuse of public funds, after the independence referendum previous year which was deemed illegal by Madrid.
The protest was organised by two centre-right parties, the Popular Party and Ciudadanos, with the new far-right Vox Party also participating. The Catalan groups want a referendum on independence included on the agenda, which Madrid will not accept.
Recent opinion polls have shown the Popular Party, Ciudadanos and Vox could win a majority of seats in parliament if elections were held, allowing them to replace the Socialist government.
If Mr Sanchez is unable to approve his budget, he could call elections before his term is over in 2020.