Chan Wing-yan, a police officer, goes undercover into an organized crime triad; only his direct superior, Superintendent Wong, is aware of his mission and true identity. Around the same time, Lau Kin-ming, a triad member, infiltrates the Hong Kong Police Force on the orders of a powerful gang boss, Hon Sam. Each mole has been planted by the rival organisation to gain an advantage over the other side. Over the course of ten years, Chan experiences great stress from his undercover work while Lau quickly rises through the ranks in the police department.
Using Morse code, Chan is able to relay data back to the police. However, Lau alerts Hon, giving him enough time to order his minions to dispose of the evidence. After the incident, both Wong and Hon are tasked with finding the moles in their respective organization.
Wong intends to pull Chan out of undercover work for fear of his safety. However, Wong is caught by Hon’s men and is killed when he is thrown off a building, having refused to reveal Chan despite a beating from the gangsters.
Through this incident, Lau retrieves Wong’s cell phone and contacts Chan; both of them agree to foil a drug deal by Hon. The plan succeeds and many of Hon’s men are arrested, while Lau betrays Hon and murders him. Everything seems to have returned to normal. However, back at police headquarters, Chan discovers that Lau was the mole and leaves immediately.
Chan and Lau meet on the same rooftop where Wong was killed earlier. Chan disarms Lau and holds a pistol to his head as a rebuke to Lau’s plea for forgiveness and request to remain a cop. Inspector B arrives on the scene shortly and orders Chan to release Lau. Chan holds Lau as a hostage at gunpoint and backs into the lift, but upon moving his head from behind Chan is suddenly shot in the head by B, who then reveals to Lau that he is also a mole planted by Hon. As they take the lift down to the lobby, Lau kills B out of his desire to eradicate traces of his past, become a “good guy” cop, and end the mole hunt. Stepping out of the lift, Lau shows his identity card to the police to identify himself as one of them.
Months after Chan’s death, his psychiatrist Lee discovers records revealing Chan’s true identity as an undercover police officer; B becomes a scapegoat for Lau as the real mole in the police force and the case is closed. Lau salutes Chan at his funeral. A flashback reaffirms the point at which Lau wished he had taken a different route in life.
(As Mainland China and Malaysia have restrictions that villains should be punished in the end, another ending is broadcast that Lau is announced that his identity has been uncovered and is arrested as the police arrive, which would make the plots incoherent with the sequels.)