We model the joint evolution of contracts and precedents by introducing imperfect enforcement into a standard incomplete contracts setup. We assume that biased trial courts can refuse to verify novel evidence but are bound to respect precedents, namely to verify evidence that other judges verified in past cases. We find that optimal contracts are innovative (contingent on both precedents and novel evidence), but noisy evidence and judicial biases introduce enforcement risk and cause incentives to be low-powered. Litigation of innovative contracts refines the law, making it more informative. This evolution improves enforcement and makes contracts more complete, thereby enabling higher-powered incentives and improving welfare. This beneficial mechanism is hampered by judicial bias, which slows down legal evolution and causes enforcement risk to persist for a long time.