The UN is intimately involved in efforts to restore the rule of law in conflict and post-conflict settings. Yet despite the importance of the rule of law for peace, good governance, and economic growth, evidence on the impact of these efforts is scant. I develop a theory to explain when UN rule of law reform is likely to succeed, then test the theory using original datasets capturing the number of civilian personnel deployed to each UN mission in Africa, the number of personnel assigned specifically to rule of law-related tasks, and the extent and nature of actual rule of law-related activities in the field. The correlation between UN presence and the rule of law is weak while conflict is going, but robustly positive during periods of peace. The relationship is stronger for civilian than uniformed personnel, but holds only when UN missions engage host states in the process of reform.