Judges sometimes hear cases in which the law, as they honestly understand it, requires results that they consider morally objectionable. Most people assume that, nevertheless, judges have an ethical obligation to apply the law correctly, at least in reasonably just legal systems. This is the view of most lawyers, legal scholars, and private citizens, but the arguments for it have received surprisingly little attention from philosophers. Combiming ethical theory with discussions of caselaw, Jeffrey Brand-Ballard challenges arguments for the traditional view, including arguments from the fact that judges swear oaths to uphold the law, and arguments from our duty to obey the law, among others. He then develops an alternative argument based on ways in which the rule of law promotes the good. Patterns of excessive judicial lawlessness, even when morally motivated, can damage the rule of law. Brand-Ballard explores the conditions under which individual judges are morally responsible for participating in destructive patterns of lawless judging. These arguments build upon recent theories of collective intentionality and presuppose an agent-neutral framework, rather than the agent-relative framework favored by many moral philosophers. Defying the conventional wisdom, Brand-Ballard argues that judges are not always morally obligated to apply the law correctly. Although they have an obligation not to participate in patterns of excessive judicial lawlessness, an individual departure from the law so as to avoid an unjust result is rarely a moral mistake if the rule of law is otherwise healthy. Limits of Legality will interest philosophers, legal scholars, lawyers, and anyone concerned with the ethics of judging.