William J. Bratton, the commissioner of the New York Police Department and the most widely recognized face in American policing, will step down next month to take a job with a private advisory firm, ending a 45-year career in public life that spanned the country, from Boston to Los Angeles, and that reshaped the image of what a police commander could be.

The timing of Mr. Bratton’s departure and the choice of his successor were made final only on Monday evening, and the details remained under wraps until just a couple of hours before the official announcement on Tuesday afternoon at City Hall.

In detailing the change in leadership, Mayor Bill de Blasio emphasized “continuity,” and Mr. Bratton highlighted a “seamless transition.” But like every previous change atop the Police Department, the nation’s largest force, the news raised a host of questions about its direction. Mr. Bratton’s departure comes at a time when police agencies around the country are under intense pressure to address questions about racial bias and the excessive use of force.

“Policing is never done; it’s always unfinished business,” Mr. Bratton said, speaking last in a kind of valedictory address. “The issues that we’re facing now are going to require years to resolve.”