Labor market opportunities and wages may be unfair for various reasons, and how workers respond to different types of unfairness can have major economic consequences. Using an online labor platform, where workers engage in an individual task for a piece-rate wage, we investigate the causal effect of neutral and gender-discriminatory unfair chances on labor supply. We randomize workers into treatments where we control relative pay and chances to receive a low or a high wage. Chances can be fair, unfair based on an unspecified source, or unfair based on gender discrimination. Unequal pay reduces labor supply of low-wage workers, irrespective of whether the low wage is the result of fair or unfair chances. Importantly, the source of unfair chances matters. When a low wage is the result of gender-discriminatory chances, workers matched with a high-wage worker substantially reduce their labor supply compared to the case of equal low wages (-22%). This decrease is twice as large as those induced by low wages due to fair chances or unfair chances coming from an unspecified source. In addition, exploratory analysis suggests that in response to unequal pay, low-wage male workers reduce labor supply irrespective of the source of inequality, whereas low-wage female workers reduce labor supply only if unequal pay is due to gender-discriminatory chances. Our results concerning gender discrimination indicate a new reason for the lower labor supply of women, which is a prominent explanation for the gender gap in earnings.