One Sunday morning in February, Kenneth P. Thompson, the Brooklyn district attorney, showed up with some fellow politicians to celebrate the 249th anniversary of the African Wesleyan Methodist Episcopal Church. The event, in Bedford-Stuyvesant, was supposed to be one of those occasions elected officials love: a straightforward, stress-free gathering of voters that focused on history, not headlines.

But as the service neared the end, the Rev. Mark Taylor, a firebrand of a preacher, rose to give the sermon and opened his remarks with a pointedly political introduction. “Here with us today is Brooklyn’s first black district attorney,” Mr. Taylor roared. “He has done something no one else has done. He has indicted a police officer who murdered a black man!”

Though the packed church broke into applause, Mr. Thompson, who was sitting with his old friend Hakeem Jeffries, the Brooklyn congressman, acknowledged the ovation with a cautious nod. Like many prosecutors, Mr. Thompson’s behavior is a bit austere in public, and this time he had reason. Mr. Taylor was mistaken: the officer in question, Peter Liang, had been charged with manslaughter, not murder. More important, the shout-out from the pulpit had not-so-subtly reinforced a lingering perception that Mr. Thompson had been struggling to deflect: that his decisions in that controversial killing had been filtered through the politics of race.

It was a complicated debut year for Mr. Thompson, who after a rancorous campaign against the longtime incumbent, Charles J. Hynes, assumed his post in January 2014 promising not only to revitalize an office that had fallen prey to scandal, but also to recalibrate the way that Brooklyn’s criminal-justice system deals with its minority communities. Rising to power on the same progressive wave that swept Mayor Bill de Blasio into City Hall, he took over the position flush with optimism, vowing to reinvestigate dozens of his predecessor’s dubious convictions and to end — against the wishes of the police — the prosecution of minor marijuana busts.