This paper studies an optimal reinsurance problem for a utility-maximizing insurer, subject to the reinsurer’s endogenous default and background risk. An endogenous default occurs when the insurer’s contractual indemnity exceeds the reinsurer’s available reserve, which is random due to the background risk. We obtain an analytical solution to the optimal contract for two types of reinsurance contracts, differentiated by whether their indemnity functions depend on the reinsurer’s background risk. The results shed light on the joint effect of the reinsurer’s default and background risk on the insurer’s reinsurance demand.