The pope celebrated Mass for 18,000 people. Huge crowds began gathering early for the event.
Before Mass began, Francis circled the crowd inside the Garden while inside a vehicle that resembled a golf cart.
"He wants to do that so he can see the people," Timothy Cardinal Dolan said.
The pope also blessed a few select people at the front of the altar before mass commenced.
Francis was wearing green vestments for the Mass. The readings were said in English and Spanish, and other prayers were in Gaelic, Polish, German and other languages.
Pope Francis praised big cities for their diversity and culture but warned that they can also make their people feel they don't belong, shunning them and treating them like second-class citizens.
WATCH THE COMPLETE HOMILY HERE
During the Mass, Francis emphasized a point he has made throughout his U.S. trip: the need to welcome foreigners and marginalized people.
In his homily he also cited "children who go without schooling, those deprived without medical insurance, the homeless, the forgotten elderly."
He says God "frees us from anonymity, from a life of emptiness and selfishness." He also says, "God is living in our cities," and so is the church.
About 200 deacons and 150 volunteers assisted him in giving out communion.
Cardinal Dolan said in his "Words of Welcome and Gratitude" after communion that "At every single mass, every single day we pray for, and in union with, Francis our pope and now here you are." That brought the thousands to their feet for a standing ovation.
As he gave his final blessing, he said to the crowd, "Please, don't forget to pray for me."
(Some information from the Associated Press)