A number of the largest U.S. firms have been involved in labor discrimination despite having policies in place designed to avoid that outcome. This paper diagnoses the phenomenon and proposes contractual and regulatory solutions to ameliorate the situation. Existing research (e.g., Becker (1957), Coate and Loury (1993)) studies a situation in which an individual person practices discrimination. In contrast, this paper considers a hierarchical organization in which a manager (the agent) may or may not have a discriminatory taste toward his subordinates, whereas an owner (the principal) is unbiased and only cares about profit. The manager perfectly observes productivity levels of the subordinates and decides whom to promote. The owner only sees results of the manager's decision: the promoted worker's identity and that worker's performance. In this environment, I study a direct mechanism and characterize an optimal contract. Additionally, I compare the allocation implemented by the optimal direct mechanism to the first-best (full information) allocation and discuss the effectiveness of current regulations (e.g., affirmative action, taxation on the minority promotion ratio): I find that a regulator (such as the U.S. Equal Employment Opportunity Commission) can improve compliance withnon-discriminatory conduct, despite the fact that the person on whom the regulation is directly incident---the principal---is not intrinsically biased. I also show that the regulation can be counter-productive if it attempts to enforce perfect fairness (the first-best allocation) when that allocation is not incentive feasible. Finally, I review the U.S. law of discrimination and analyze statutory and jurisprudential issues regarding the optimal mechanism.