Bishop Peter Libasci said even after Foley was captured for the first time in Libya in 2011, he "went back again that we might open our eyes."
The Mass was attended by Foley's parents, John and Diane Foley, and hundreds of others in their hometown of Rochester, New Hampshire. The bishop read aloud a letter from the Vatican extending the condolences of Pope Francis.
Foley was kidnapped on Thanksgiving Day 2012 while covering the Syrian uprising. The Islamic State posted a Web video Tuesday showing his killing and said it was in retaliation for U.S. airstrikes in northern Iraq.
Libasci invoked the prayer of St. Francis, which begins, "Lord, make me an instrument of your peace," to implore the gathered not to hate but to heal.
"It is in giving that we receive," he recited. "It is in pardoning that we are pardoned. It is in dying that we are born to eternal life. To these words, I think we can say, 'Yes, I wish we could do that.' It is not beyond our capability. It is not impossible. Our Lord lived it. Our most Blessed Mother lived it. Many saints have lived it. James lived it."
In a packed Our Lady of the Holy Rosary church, the bishop frequently addressed Foley's parents and stressed their son's connection to family. He also prayed for another captive journalist, Steven Sotloff, and all captives.
"Jim went back again that we might open our eyes," Libasci said. "That we might indeed know how precious is this gift. May almighty God grant peace to James and to all our fragile world."
A funeral for Foley will be Oct. 18, what would have been his 41st birthday.
At a vigil Saturday night in Rochester, about 200 people gathered to show support for the Foley family.
"We are honored that you care and love Jim. We are honored that you recognized the sacrifices he made," John Foley said then. "He loved the Syrian people. He was devoted to telling their story and doing whatever he could to help their fight."
Speakers praised Foley's determination to report on the Syrian people uprooted by conflict.
"Tonight we want to honor freedom and love: the freedom that James so vehemently believed that all people deserved," said Nadia Alawa, founder of NuDay Syria, a Massachusetts-based organization working to ease the pain and loss in Syria. "To James Foley, denying others freedom and a basic voice of feelings and free space was not OK."
The world's largest bloc of Islamic nations also denounced Foley's "heinous" killing and reiterated its support for international efforts to confront the Islamic State.
Iyad Madani, chief of the Organization of Islamic Cooperation, said in a statement Saturday that the actions of the Islamic State have nothing to do with the values of Islam or his organization's founding principles of tolerance and co-existence.