A severed human arm is found floating in the Hudson River, and Detective Lefransky (Randy Jurgensen) from the New York Police Deparment orders forensic scientist, Dr. Rifkin (Barton Heyman), to match the arm to a torso found earlier.
That evening, in a predominantly gay neighborhood in Manhattan, patrolman DiSimone (Joe Spinell) and his partner, Desher (Mike Starr), order two transvestite prostitutes into their police car and sexually harass them. Nearby, a man (Richard Cox) wearing sunglasses and a black leather jacket enters a gay nightclub filled with homosexual men dancing, kissing, and publicly performing acts of sadomasochism. A patron named Loren Lukas (Arnaldo Santana) approaches the man in sunglasses and propositions him for sex; soon after, they leave the nightclub and get a room at the St. James Hotel, where the man in sunglasses ties Lukas's hands and feet together, sings the words, "I'm here, you're here, we're here," and stabs him to death. The murder tells the dead Lukas, "you made me do that".
At the forensics lab, Rifkin examines Lukas's body and informs Captain Edelson (Paul Sorvino) that the killer's DNA cannot be determined from ejaculate found inside the body's rectum because the semen contains no sperm (indicating that the killer is sterile). Later, Edelson questions DaVinci (Gene Davis), one of the two transvestite prostitutes stopped by DiSimone and Desher, and shows him mug shots of potential suspects. DaVinci provides information, then tells Edelson that patrolman DiSimone forced him to perform oral sex the other night, but Edelson refuses to believe him.
Later that day, Steve Burns (Al Pacino), a young policeman, reports to Edelson's office where he is briefed on Lukas's killing as well as the murder of Paul Vincent, a gay college professor. Edelson believes the same killer committed each crime, and asks Steve to investigate the case undercover, posing as a homosexual, because he looks like the two victims.
In bed with his girlfriend, Nancy (Karen Allen), Steve tells her that he must go away for a while and cannot talk about his assignment. He only tells Nancy that although his "deep undercover" job is potentially dangerous, it will allow him to skip patrol duties and become a detective.
In a predominantly gay area of the West Village, Steve moves into an apartment and meets his neighbor, a young homosexual man named Ted Bailey (Don Scardino). Steve introduces himself as "John Forbes," and joins Ted at a café, where they eat lunch and discuss the recent killings in the neighborhood. At night, Steve visits gay bars and observes the large crowds of gay men that frequent each one late at night. Slowly acclimating to the scene, he lifts weights at home and applies makeup before going out.
One night, the killer meets Eric Rossman (Larry Atlas) in a park, and they head to the woods to have sex; however, they become separated, and the killer taunts Rossman with the same song he sang before Lukas's murder. The killer then sneaks up on Rossman and stabs him to death. "You made me do that" says the killer.
Emotionally disturbed by the investigation, Steve sleeps with Nancy at her apartment and tells her he does not want to lose her. Later, Steve attends a "Precinct Night" at a gay club, where patrons dress up as policemen (one the patrons is DiSimone), but Steve is kicked out by the bouncer for not wearing the proper costume (Steve wears his black leather jacket and black jeans). Outside the club, a young man named Skip Lee (Jay Acovone) propositions Steve for sex, but Burns rejects him. When he returns to Nancy's apartment and makes love to her, Steve continues to hear sounds from the gay nightclub in his mind.
Sometime later, fashion designer Martino Perry (Steve Inwood) visits an adult bookstore and follows the killer into a peep show booth. As they watch an adult film together, Perry lowers to his knees to go down on him, and the killer grabs a knife and stabs Perry in the back.
At the police station, the Chief of Detectives (Allan Miller) visits after hearing about this latest murder and orders Edelson to solve the murders before the upcoming Democratic National Convention.
At a nightclub, Steve asks a bartender about Skip Lee, the young man who recently propositioned him, and learns that Lee has a bad reputation for being violent.
Detective Lefransky finds DaVinci, the transvestite, on the street, and DaVinci tells him that Lee works at The Iron Horse, a steakhouse. There, Lefransky and Detective Schrieber (Ed O'Neil) obtain a steak knife used by patrons. Examining the knife, Rifkin determines that it might match the killer's weapon. Soon after, Steve finds Lee at a club, takes him to a motel room, and asks Lee to tie him up, while policemen listen to the interaction on a surveillance device. Shortly after, police burst into the motel room and arrest Burns and Lee. Though Lee appears to be innocent, they force him to provide a semen sample; however, it contains sperm and therefore does not match the killer's.
At her apartment, Nancy asks Steve why he no longer seems attracted to her, and he blames the undercover work. At Nancy's suggestion, they agree to break up for a while. Steve then meets Edelson and tells him he can no longer handle the job, but Edelson insists he needs Steve to continue the investigation and gives him a yearbook from Columbia University. In the yearbook, Edelson has marked the names of Paul Vincent's former students, believing one of them might be the killer. Burns recognizes one of the students, Stuart Richards, and finds his address.
Steve locates Richards' apartment and begins staking it out. Steve follows Richards and breaks into his apartment one day when he is out. Inside, he finds a box of letters Richards has written to his father, Jack, but never mailed. In the letters, Richards describes his dark thoughts. When he returns home, Richards realizes someone has broken in and spots Steve outside his window on the fire escape ladder. Richards then walks to the nearby park and imagines he sees his father sitting on a bench. Recalling the murders he has committed, Richards apologizes to his father, who seems to disapprove of his son. Before leaving, Richards hears his father say, "You know what you have to do."
Steve returns to his apartment building and knocks on Ted's door, but Ted's roommate/lover, Gregory Milanese (James Remar), answers. Assuming Ted and Burns are having an affair, Gregory threatens him with a knife after they have a physical altercation.
Steve later waits outside Richards's apartment until Richards emerges and heads to the park. They meet at a bench and Steve invites Richards back to his apartment, but Richards suggests they go to the nearby tunnel instead. Steve agrees, and inside the tunnel, takes his pants off. Ordering Richards to do the same, Steve watches as Richards slips a knife from his boot. Wielding his own knife, Steve stabs Richards in the gut and places him under arrest.
At the hospital, Edelson tells Richards that the police matched his fingerprint to a quarter used at the peep show at the time of Perry's killing, and promises to reduce his sentence if he confesses to all of the murders. As Burns leaves, Edelson welcomes him to the detective division. Meanwhile, detectives collect evidence from Richards's apartment and learn that his father died ten years ago.
Some time later, patrolman DiSimone briefs Edelson inside Ted Bailey's apartment, where Ted's body has been found, stabbed to death, and Edelson realizes that Steve Burns lived next door while working under cover. He also comes to realize that DiSimone knows all about DaVinci when the policeman makes a slip about the transvestite.
In the final scene, Nancy finds Steve at her apartment, and he tells her he is moving back in with her. While she waits for him to shave off his beard that he grew during his undercover work, Nancy finds a leather jacket, police hat, and a pair of sunglasses left behind by Steve and tries them on. Unbeknownst to her, it's the same outfit Richards wore when he committed the murders.