Not my area of expertise, but I know that New York City went through convulsions over police abuse and reform following the American Civil War. I will paste some Wikipedia text below.
But first, this passage from E.L. Doctorow’s exquisite novel The Waterworks (1994). The location is New York City; the year, 1871:
I decided first of all to tell what I knew to Edmund Donne, a captain with the Municipal Police. You may not appreciate how extraordinary it was that I, or anyone else in the city of New York, for that matter, would confide in a police official. The Municipals were an organization of licensed thieves. Occasionally they interrupted their graft - gathering for practice with nightsticks on the human skull. Police jobs were customarily bought. Every exalted rank, from sergeant up through lieutenant, captain, and on to the commissioner, paid the Tweed Ring for the privilege of public service. Even patrolmen paid if they wanted to be assigned to one of the more lucrative precincts. But it was a large organization of two thousand or so, and there were some exceptions to the rule, Donne being probably the highest - ranking. Among naturalists, when a bird is seen well beyond its normal range, it is called an accidental. Donne was an accidental. He was the only captain I knew who had not paid for his commission.
He was also atypical of his trade in being neither Irish nor German nor uneducated. In fact, he was so dearly misplaced that he was a mystery to me. He lived in the tension characteristic of the submitted life, like someone who has taken holy orders or serves his government in an obscure foreign station. I could think, in his presence, that my familiar tawdry New York was the exotic outpost of his colonial service, or perhaps a leper colony to which he’ d given his life as a missionary.
Exquisite, yes? That man could write. (To my mind, Ragtime (1975) is the Great American Novel. The.)
Wikipedia:
The New York City Police Department (NYPD) originates in the Government of New York City attempts to control rising crime in early to mid 19th century New York City. This increased crime was due to an increased population, caused primarily by poor Irish immigrants beginning in the 1820s. The City’s reforms was modeled upon London’s Metropolitan Police Service of a full-time professional police force in 1845. The Municipal Police replaced the inadequate night watch system which had been in place since the 17th century, when the city was founded by the Dutch as New Amsterdam.
In 1857, the Municipal Police were tumultuously replaced by the Metropolitan Police, which consolidated other local police departments.
Late 19th and early 20th century trends included professionalization and struggles against corruption.