On Christmas Day in 1986, Nicholas Guido was sitting outside his mother’s Brooklyn home in his bright red Nissan Maxima, wearing the clean white jacket he had just gotten as a gift.

Two decorated police detectives had used a department database to track down his address, prosecutors later said. They were moonlighting for an organized crime boss who wanted a rival named Nicholas Guido killed.

Instead of the rival’s address, though, the detectives had passed along the address of a 26-year-old telephone installer with the same name. He was the one who was gunned down.

Twenty-eight years later, New York City has reached a $5 million settlement with Mr. Guido’s family as part of an effort to close one of the most startling chapters of police corruption in the city’s history.

“This tragic matter involves the murder of an innocent man,” the city Law Department said in a statement. “After evaluating all the facts, it was determined that settling the case was in the city’s best interest.” The settlement was reported on Friday by The Daily News.

When Mr. Guido’s mother, Pauline Pipitone, rushed out of her home in Windsor Terrace on that Christmas morning, she found her son slumped behind the wheel of his car, his jacket sprayed with blood, she testified at the detectives’ racketeering trial. “His fingertips were cold,” she said.

Ms. Pipitone did not return messages left for her on Saturday, and a lawyer for the family could not be reached.

The detectives whose tip led to Mr. Guido’s death were Louis Eppolito and Stephen Caracappa, the so-called Mafia Cops. An underboss in the Luchese crime family, Anthony Casso, was paying them $4,000 each month, according to prosecutors. In exchange, they helped him kill eight adversaries in the 1980s and 1990s.

The victims included James Hydell, whom the detectives kidnapped off the street, stuffed into a truck and then turned over to Mr. Casso.

And there was Israel Greenwald, a diamond dealer the detectives stopped while he was driving home from work, telling him he was a suspect in a hit-and-run accident. Instead of arresting him, they took him to a parking garage, bound his hands, placed a bag on his head, shot him twice and then, according to prosecutors, buried his body beneath the garage’s concrete floor.

Mr. Greenwald’s remains were not found until 2005.

By then, the retired detectives lived across the street from each other in a gated community in Las Vegas. They collected their police pensions, and Mr. Eppolito played bit parts in nearly a dozen popular movies, including “Goodfellas,” portraying mobsters, hoodlums and drug dealers.

They were finally arrested in 2005, and ultimately convicted of serving as assassins and spies for the Mafia. Both men are serving life in prison.

For years, the city fought to prevent relatives of victims of their crimes from suing the city. That impasse was broken last fall, when a federal judge ruled that the wrongful-death lawsuits could proceed. He cited evidence that the killings would not have occurred if Mr. Eppolito had been fired in the mid-1980s, when he was caught passing confidential police records to a mobster.

.