I develop a model of marriage in which spouses decide on investments in child quality during marriage, and on the allocation of child custody should they divorce. The custodial allocation determines the share of the marital surplus each spouse appropriates, which in turn influences spouses' investment incentives. The custodial allocation therefore has both distributional and efficiency. I derive the equilibrium investments and optimal custodial allocation, and identify three channels through which making divorce easier affects child welfare: investments in child quality during marriage, the likelihood of divorce, and the allocation of custody if divorce occurs.