While most market transactions are subject to strong incentives, transactions within firms are often not explicitly incentivized. This paper offers an explanation for this observation based on the assumption that agents are envious and suffer utility losses if others receive higher wages. We analyze the impact of envy on optimal incentive contracts in a general moral hazard model and isolate the countervailing effects of envy on the costs of providing incentives. We show that envy creates a tendency towards flat-wage contracts if agents are risk-averse and there is no limited liability. Empirical evidence suggests that social comparisons are more pronounced among employees within firms than among individuals that interact in markets. Flat-wage contracts are then more likely to be optimal in firms.