Under the slogan "A million voices!," gays, lesbians, transvestites, transsexuals and supporters marched along Copacabana beach.
"It is important that the population understands their rights and they express themselves against homophobia," said Carlos Tufvesson, one of the event organizers.
More than a million people were expected for the event, organizers said.
Brazil recorded 312 murders of people in the gay community in 2013. The country averages about 300 murders motivated by sexual orientation a year.
The violence prompted rights group Grupo Gay da Bahia to label the country "the world champion of homophobic crimes."
Around 40 percent of recorded crimes against gays in South America occur in Brazil.
But recently the country's highest court has taken steps in favor of gay rights.
In 2011, the Supreme Court recognized gay unions which are afforded the same rights as heterosexual couples.
The Supreme Court ruled in 2013 that public institutions could not reject gay marriage applications.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.