We investigate the effects of law enforcement framing and social context on compliance with the law in a lab-in-field experiment. In particular, we examine the effects of framing a simple lottery choice as a law enforcement problem, the effects of noncompliance imposing an external cost on independent third parties, and the effects of compliance providing a public good to other group members. We varied the probability of monitoring for each of these contexts from low probabilities that would not induce a risk-neutral individual to comply to high probabilities that would motivate such an individual to comply. Increased monitoring had a positive effect on compliance regardless of the context. We found weak evidence that law enforcement framing increased compliance relative to the simple lottery when compliance provided a public good to group members, but the law framing had an unexpected negative effect on compliance when obeying the law did not benefit group members. Compliance was not affected when violating the law imposed an external cost on third parties. However, compliance with the law was higher when it provided a public good to group members, especially under low monitoring probabilities.