Importance: There is limited evidence supporting an association of autism spectrum disorder (ASD) with suicidality and the risk factors for suicide attempt and suicide among people with ASD. Existing research highlights the need for national cohort studies. Objectives: To analyze whether people with ASD have higher rates of suicide attempt and suicide compared with people without ASD using national register data, identify potential risk factors for suicide attempt and suicide among those with ASD, and examine associations with comorbid disorders. Design, Setting, and Participants: In this cohort study, nationwide register data from January 1, 1995, to December 31, 2016, were gathered on 6 559 266 individuals in Denmark aged 10 years or olde...