Detection of nucleic acids and induction of type I interferons (IFNs) are principal elements of antiviral defense but can cause autoimmunity if misregulated. Cytosolic DNA detection activates a potent, cell-intrinsic antiviral response through a poorly defined pathway. In a screen for proteins relevant to this IFN-stimulatory DNA (ISD) response, we identify 3' repair exonuclease 1 (Trex1). Mutations in the human trex1 gene cause Aicardi-Goutieres syndrome (AGS) and chilblain lupus, but the molecular basis of these diseases is unknown. We define Trex1 as an essential negative regulator of the ISD response and delineate the genetic pathway linking Trex1 deficiency to lethal autoimmunity. We show that single-stranded DNA derived from endogenous retroelements accumulates in Trex1-deficient cells, and that Trex1 can metabolize reverse-transcribed DNA. These findings reveal a cell-intrinsic mechanism for initiation of autoimmunity, implicate the ISD pathway as the cause of AGS, and suggest an unanticipated contribution of endogenous retroelements to autoimmunity.