Somewhere along the line, a rumor started that police can’t lie to suspects, especially if the suspect asks whether the undercover officer is a cop. If the cop does lie, the story says, it’s entrapment. This is a myth. Cops can and do lie all the time. It would be hard for them to do their jobs otherwise.
Nevertheless, the defense of entrapment does exist. Its primary purpose is to ensure that otherwise innocent people aren’t lured by police into attempting crimes they otherwise never would have committed. The underlying idea, I think, is that everyone has a price. Given enough incentive, even the most law-abiding among us might be tempted to stray. (This was part of the idea in the movie Indecent Proposal.)
In the United States, standards vary for determining whether entrapment has occurred. Some states use a subjective test, asking whether the defendant was predisposed to commit the crime. Others use an objective test. That asks whether a reasonable law-abiding person, placed in the defendant’s shoes, would have been likely to commit the offense.
Entrapment comes up as a defense most often during sting operations, when undercover officers induce someone to do something illegal. Of course, the intention of the operations (we hope) is to catch people who already planned illegal activity. Sting operations can be very useful in a variety of contexts, such as prostitution, drug trafficking, and auto theft. But if the operation goes too far, innocent people may be drawn in. Police who want to engage in these activities need to be careful not to cross over the line.
For federal cases on entrapment, check out Jacobson v. United States (involving child pornography) and Sorrells v. United States (alcohol during Prohibition). Either could serve as good plot inspiration.