"Today's celebration is more than an occasion of gratitude for graces received," Benedict told 57,000 people who filled the baseball stadium on Sunday.
He called the mass "a summons to move forward with firm resolve to use wisely the blessings of freedom, in order to build a future of hope for coming generations".
He flew out of New York on Monday.
Repeating a core message of his visit, - that faith must play a role in public life - the pope cited the need to oppose abortion on Sunday.
The unwavering truth of the Roman Catholic message, he said, guarantees respect for the dignity of all "including the most defenceless of all human beings: the unborn child in the mother's womb".
There was heavy police presence at the venue and two sand-filled dump trucks blockaded the main road outside the stadium as additional security.
In his sermon, Benedict praised the US church for uniting "a widely diverse flock".
Catholic leaders hope the papal visit will begin the US church's comeback after years of declining confidence in its moral stature amid cases of priest sexually abusing children.
During his visit, Benedict reached out to the victims of sexual abuse by priests, inviting them to share their anguished personal stories with him.
But the Survivors Network of those Abused by Priests said he had not done enough.
Dozens of new people had come forward in the last few days to say they were molested as children, the group said.
Earlier on Sunday the pope blessed the site of the World Trade Centre, the two towers that were destroyed in the suicide attacks in 2001, and prayed with two dozen survivors, relatives of victims and rescue workers.
Benedict also addressed other issues including immigration rights, terrorism, human rights and, the Catholic faith and practice.