A girl who says a corrupt NYPD detective put her on the street when she was a 13-year-old runaway and forced her to work as a prostitute has filed a $25 million law suit.

The suit accuses Wayne Taylor, a former city narcotics detective of pimping out the Brooklyn youngster and taking money from men who wanted to have sex with her.

The Brooklyn federal court lawsuit, which names the city, the NYPD and the officer, was filed by the girl, who is still a minor, and her mother. The Post is withholding their names.

The cop told the girl that she had been “sold” to him for $500, and then he forced her to dance naked at parties and service adult men in Jan. 2008, the suit says.

If she failed to follow his directives, Taylor and his girlfriend threatened to either beat or arrest the girl, the suit says.

The officer eventually pleaded guilty to attempted kidnaping and served 3 1/2 years before he was paroled in January.

The girl’s attorney, Robert Tolchin, said that the NYPD had been tipped to the fact that Taylor was involved in illegal activities, but nevertheless kept him on the streets.

“How do you keep this guy on the job with a shield and a gun and assigned to the narcotics bureau when he has an unresolved petition for for promoting prostitution?” the Brooklyn attorney said.

A spokeswoman for New York City’s law department said officials were waiting to see the suit..