The 76-year-old pope spoke to a crowd estimated by the Vatican to be more than 2m people gathered on Rio's famed Copacabana beach for an evening rally.
He also urged young people to shun fleeting fads and be "athletes of Christ".
Pope Francis, nearly concluding his first overseas trip, received yet another rapturous welcome when he arrived at the crescent-shaped beach.
He stopped his popemobile several times to kiss babies and an Argentine flag that was waved at the car.
Most participants planned to spend the night on the sand and adjacent pavement to hold their places for today’s closing mass on the same spot, making the place a giant campsite.
Brazil, Latin America's largest nation, has been rocked by massive protests against corruption, the misuse of public money and the high cost of living. Most of the protesters were young.
Pope Francis told the gathering he knew that young people had taken to the streets in Brazil and elsewhere "to express their desire for a society that is more just and fraternal".
Speaking from a giant white stage, he encouraged them to fight apathy and be "protagonists of change" and offer "a Christian response to the social and political concerns arising in many parts of the world".
In his prepared text, he had added that they should do it in an "an orderly, peaceful and responsible way" but he improvised and did not read that part of his address.
The Vatican says that when the pope departs from his prepared text and omits phrases, his thoughts are considered valid nonetheless.
Pope Francis has dedicated much attention in his speeches to the problems, the prospects and the power of young people.
On Friday night he urged them to change a world where food is discarded while millions go hungry, where racism and violence still affront human dignity, and where politics is more associated with corruption than service.
The day before, during a visit to a Rio slum, he urged them to not lose trust and to not allow their hopes to be extinguished.
Many young people in Brazil saw this as his support for peaceful demonstrations to bring about change.
The Copacabana events were to have taken place on a pasture on the outskirts of Rio, but days of unseasonable rain turned the area into a field of mud.
Before yesterday’s event, young people in jeans and nuns in their habits shared the beach with Rio residents who had streamed out of their homes to welcome back the sun after days of clouds and downpours.
The nuns wet their feet in the surf next to women playing volleyball in bikinis.
Young people carrying flags from dozens of nations sat in the sand in groups to pray and play music.
In his address to the young, the pope asked them to hone and perfect their faith like athletes who train for a match.
"Jesus offers us something bigger than the World Cup," he told them, saying they could have a "fulfilled and fruitful life" if they followed him and not "momentary fashions and fads".
He asked them to be "true athletes of Christ".
Earlier in the day, a group of feminists bared their breasts on the beach in a protest against the church's restrictive views on female sexuality and abortion.
With hundreds of buses still arriving in Rio bringing more pilgrims, security officials said they expected the crowd to peak at 1.5 million people during this morning’s mass.