Previous research argues that the law expresses social values and could, therefore, influence individual behavior independently of enforcement and penalization. Using three laboratory experiments on tax avoidance and evasion, we study how legality affects individuals’ decisions. We find that, without any risk of negative financial consequences, the qualification of tax minimization as illegal versus legal reduces tax minimization considerably. Legislators can thus, in principle, affect subjects’ decisions by defining the line between legality and illegality. However, once we introduce potential negative financial consequences, we observe no difference between legal and illegal tax minimization behavior. Only if we use moral priming to increase subjects’ moral cost do we again find a legality effect on tax minimization. Overall, this demonstrates the limitations of the expressive function of the law. Legality might be an important determinant of behavior only if we consider activities with little or no risk of negative financial consequences or if subjects are morally primed.