As Infernal Affairs opens, Ming (Andy Lau) is being initiated into the criminal underworld by triad boss Sam (Eric Tsang), who ends his speech to his young charges by wishing them success in the police department. Ming enters the police academy, where he excels, but sees his classmate, Yan (Tony Leung), expelled for "breaking the rules." It turns out that Yan wasn't actually drummed out of the force, but recruited by Superintendent Wong (Anthony Wong) as an undercover operative. Just as Ming is achieving success in the police department while secretly working for Sam, Ming is gaining Sam's trust as a triad member, while reporting to Wong. Ten years later, both men, still undercover, have grown confused about their true identities, while their bosses, Sam and Wong, wage a battle of wits against each other. Each boss learns that the other has a mole working for him, and unwittingly entrusts the mole himself to ferret out the culprit. Ming and Yan scramble to expose one another's identity in an effort to save their own skins.
Can a crook go straight without really trying? Jewel thief Miles Logan (Martin Lawrence) was being chased by the police after a robbery when he was forced to hide a cache of diamonds, worth $20 million, at a construction site. Despite his caution, Miles ended up behind bars anyway; after serving his time, he goes back to retrieve the stones only to discover what was being built: a police station. Miles needs to spend some time at the station to figure out what happened to his nest egg, so he sneaks in, posing as a police detective. Trouble is, he's so convincing that the cops assign him a rookie partner, Carlson (Luke Wilson), to put through training. To his surprise, Miles turns out to be a good cop, and the more he tries to find the missing diamonds, the higher he's promoted through the department, until he finds himself in line for a top spot in the detective's division.