A police officer (Tony Leung Ka-fai) goes undercover in a prison, hoping to determine how the fingerprints of a recently-killed felon could belong to a con who had been executed three months before. While inside, he is tortured for getting involved in internal matters.
His fellow prisoners include Chan (who accidentally killed a card player while trying to raise money for an operation to save his girlfriend's life), Andy Lau Tak-wah (who has himself thrown in jail to exact revenge for his dead brother), Wang (a leader of the prisoners), and Sammo Hung Kam-po (a compassionate but pathetic inmate who frequently escapes to visit his young son).
When Leung kills an especially corrupt guard and is sentenced to a firing squad, he learns that the "executed" convicts are actually used by the warden (Ke Chuen-hsiang) as hitmen to assassinate untouchable criminals.