Organisers said they were not opposed to gay or lesbian rights, but wanted to defend family values and the institution of marriage.
The demonstrators called for a meeting with President Enrique Pena Nieto.
Gay and lesbian activists staged rival protests.
Public opinion in Mexico, a predominantly Roman Catholic nation, has been split since Mr Pena Nieto announced in May plans to change the constitution.
Same-sex marriages are legal in some Mexican states, but Mr Pena Nieto wants it to be allowed across the country.
Last year the Supreme Court declared that a ban on such unions imposed in many of Mexico's states was unconstitutional.
Leaders of the National Front for the Family, which organised the march, say they are not opposed to LGBT rights.
But they argue that Mexico has fallen victim of an ideological battle that threatens family values and the institution of marriage.
"In a democratic society you cannot impose a single thought," said Mario Alberto Romo, a spokesman for the group.
Demonstrators are calling for a meeting with Mr Pena Nieto to debate the issue.
LGBT rights supporters turned up at the march to show their backing for Mr Pena Nieto's proposal to legalise same-sex marriage, but police said there were no clashes.
Some of them carried banners that read: "I'm gay and I'm a Catholic" and "We also have families".
Four Latin American countries have already legalised same-sex marriage: Argentina, Brazil, Uruguay and most recently Colombia.

The 21-year-old told BBC Sport last year that he was considering an approach from Algeria.
The Lille striker was born in France and played for them at every youth level from under-16 but is eligible for Algeria through his parents.
The Algeria Football Federation said it "will immediately begin the process of registering the player with Fifa."
The federation added Benzia met its president Mohamed Raouraoua this week to finalise his choice to play for the Desert Foxes.
Even though Fifa is yet to receive Benzia's request for a switch of nationality, the Algerian football authority is confident of a swift approval by the game's governing body.
Benzia has scored 26 goals in 43 appearances during his time playing for France's youth teams.
His capture will come as a morale boost for Algeria after they were snubbed by Lyon striker Nabil Fekir last year.
Benzia started his career at Lyon where he progressed from the academy to the senior squad and made his senior debut against Nice in May 2012.
He switched to Ligue 1 rivals Lille in August 2015 in search of regular football and has already scored five goals in 20 appearances for the club this season.

Mr Rouhani is expected to secure valuable trade deals following the lifting of international sanctions over Iran's nuclear programme.
Among them is a likely agreement with French aircraft manufacturer Airbus for more than 100 new aircraft.
Mr Rouhani will also meet French President Francois Hollande.
Mr Rouhani's five-day visit to Italy and France is the first by an Iranian president in nearly two decades, as the Iranian president seeks to rebuild economic ties and secure new trade deals.
Iran is likely to need hundreds of new aircraft in the coming years as it re-establishes commercial air travel restricted by the sanctions, and French carmakers will once again be free to supply to the Islamic Republic.
As well as a deal for Airbus planes, contracts are likely to be signed with car manufacturers Peugeot and Renault, Mr Rouhani told reporters on Monday.
In Italy, Mr Rouhani met with President Matteo Renzi and Pope Francis. Monday saw contracts worth around €17bn ($18.4bn; £12bn) signed between Iranian and Italian companies.
At Rome's Capitoline Museum, where Mr Rouhani and Mr Renzi met, nude statues were covered up and wine was removed from official menus out of respect for the Islamic Republic's strict laws governing propriety.
Iranian diplomats reportedly requested that no wine be served at Mr Rouhani's lunch meeting with Mr Hollande, leading French officials to postpone the meeting until after lunch.
During their meeting, Pope Francis urged Iran to work with other Middle Eastern countries against terrorism and arms trafficking, the Vatican said.
Iran has been accused of funding militant groups, such as Hezbollah in Lebanon.
Mr Rouhani asked the pontiff to pray for him, and gave him the gift of a hand-made carpet.
Thousands of people in Mexico City have protested against a government proposal to legalise same-sex marriage, which they say would undermine traditional families.
[NEXT_CONCEPT]
Former France youth international striker Yassine Benzia has pledged his senior future to Algeria.
[NEXT_CONCEPT]
Iranian president Hassan Rouhani will arrive in France on Wednesday for the second leg of his state visit to Europe, after three days in Italy.