Last month, the detectives both pleaded not guilty in State Supreme Court in Manhattan to similar charges. In that case, prosecutors said the detectives claimed a man had threatened a person with a gun and had the weapon on him at the time of the arrest, which other evidence later contradicted.

Police officials said that the detectives had both been suspended by the department. Detective Desormeau has been with the department since 2006; Detective Cordoba joined in 2007. It is unclear whether a review of their arrest histories has uncovered any other potential wrongdoing. Lawyers for both detectives did not respond to messages seeking comment on Tuesday.

In the Queens case, prosecutors said that the detectives arrested Mr. McCoy, who was 45 at the time, on the evening of Aug. 28, 2014, for selling crack cocaine to a woman on a sidewalk near 108th Avenue and Guy R. Brewer Boulevard in the Jamaica neighborhood. In a Criminal Court affidavit, Detective Desormeau claimed that he saw a hand-to-hand exchange between the man and a woman who was not arrested. Detective Desormeau reported that he had recovered rock cocaine from the man’s waistband, prosecutors said.

Later, Detective Desormeau testified before a grand jury in Queens that he saw the man hand two women something in exchange for money, and that he had a twist of crack cocaine in his possession when he was arrested, prosecutors said. Then, the detective repeated a similar account while testifying in a hearing.

The Queens district attorney’s office ultimately dismissed the charges against Mr. McCoy, but his case had been prosecuted over a period of more than a year. Mr. McCoy’s lawyer, Gabriel P. Harvis, said that his client was worried about the prospect of facing years in prison and that he was troubled by the willingness of the detectives to misrepresent the circumstances of his arrest.