Drawing connections between his Christian faith and politics, former governor Deval Patrick delivered a sermon at Union Chapel on Sunday morning. The service drew a near-capacity crowd to the 1870 chapel, located near the historic campground neighborhood in Oak Bluffs.

“Governors don’t normally do sermons,” Mr. Patrick said, standing at a podium with a small choir seated above him and sunlight streaming through the windows of the cupola. But sermons are not unfamiliar, he said, recalling his experience as a young boy growing up in Chicago and attending the Cosmopolitan Community Church a block from his house.

From the “old ladies in hats” who attended church every Sunday, he learned the importance of a moral foundation and a moral life that extends beyond the church walls.

Chapel trustee Richard Taylor, who had encouraged Mr. Patrick to take part in the chapel’s guest preacher series this summer, introduced Mr. Patrick as “no stranger to the Vineyard. He campaigned here. He brought public resources to the Island.” The former governor, now managing director of Bain Capital, often joins the Obama family during their August vacations on the Island.

The chapel was full as many came to hear the former governor speak. — Jeanna Shepard

“It’s too grand to say that I tried to serve with faith as a moral rudder,” Mr. Patrick said, reflecting on his eight years in office. He described himself as at best an “unfinished Christian,” for whom faith was mainly a matter of kindness and compassion. “I tried to do my job and live my life as Micah teaches,” he said. “By doing justice, loving mercy and walking humbly.”

“Maybe it’s simpler to say that I tried to behave not so much as if God were watching,” he added, “but as if the ones watching were those old ladies in hats.”

He spoke with conviction about the need for politicians to focus less on their public performance than on the substance of their work, and to see beyond policies to the people they affect. He worried that in conventional political debates liberals and conservatives alike “have perhaps lost sight of, or even interest in, the people at the end of their choices.”

He listed some of the state’s many accomplishments — at the end of his tenure Massachusetts was first in the nation in economic competitiveness, student achievement, healthcare coverage and other measures — but again stressed the importance of focusing on people.

“What matters most is beyond statistics, surveys and awards,” he said. “It’s the human souls behind the policy choices we make.”

The killing of nine parishioners at the Emanuel African Methodist Church in Charleston in June and the police killings of unarmed black men – not just those who have made national headlines – have been a source of personal anguish, Mr. Patrick said, and have raised questions not only about race relations in the United States, but of the state of humanity itself.

After the service, Mr. Patrick greeted well-wishers. — Jeanna Shepard

“What kind of people harbor such fear of someone like me that they shoot before asking any questions?” he said. “What kind of person gets so worked up about the presence of peaceable black people that he shoots them dead while they are worshipping?”

“Good people are becoming bystanders to injustice and unfairness,” he added, noting that even some Massachusetts politicians have been quiet on the issue of whether to remove the Confederate flag from the South Carolina State House. “But scripture teaches that faith demands action.”

Faith calls on people not simply to reflect on justice, mercy and humility, he said, “but rather to do justice, to love the person, to walk humbly.”

“In a local, state or national community, social justice is ultimately up to all and each of us.”

Mr. Patrick spoke of his decision in 2014 to offer temporary shelter to child refugees pouring across the Southwest border. The greatness of a superpower like the United States comes from giving rather than taking, he said.

He recalled sneaking out one afternoon without his security detail to run an errand at a nearby Home Depot. Despite a subtle disguise, he was instantly recognized, and while waiting in line at the register, was loudly reproached by someone who opposed the sanctuary plan. But on several other occasions during those few days, he said, people approached him and whispered their support.

“It’s troubling how we’ve come to whisper kindness and shout anger,” he said. “It’s upside-down. It’s time we learn to shout justice. To shout compassion. To shout love.”

“I don’t understand what good there is in faith if we can’t and won’t turn to it in moments of human need,” he said in closing. “And there is so much human need.” But looking back at past generations and the lessons learned, he added: “I’m convinced we do choose kindness, mercy and love. I’m certain we should. God knows the whole world needs us to do so.”

Following the sermon and a standing ovation, many in the congregation lined up in front of the stage to greet Mr. Patrick, who in typical Sunday fashion chatted warmly with friends and strangers and posed for photographs as the congregation slowly dispersed.