Abstract Purpose Autistic people have a significantly increased risk of death by suicide relative to the general population. In non-autistic samples, psychological wellbeing has been shown to moderate the relationship between depression and suicidal thoughts and behavior. Thoughts of self-harm may provide a useful indicator of suicidal risk. In this longitudinal study we examined (a) the potential role for psychological wellbeing to moderate the relationship between depressive symptoms and thoughts of self-harm and (b) the contribution of autistic traits to thoughts of self-harm. Methods Participants were 209 autistic adolescents and adults aged 15 to 80 years ( M age = 34.20, SD = 15.38 years). Results At both baseline and 2-year follow-up, 35% of participants reported recent thoughts of self-harm. Wellbeing was associated with autistic traits ( r = − .350 to − 0.404) and depression ( r = − .480 to − 0.759). Thoughts of self-harm were positively associated with autistic traits and depression ( r = .242 to 0.659), and negatively associated with wellbeing ( r = − .287 to − 0.609). Controlling for baseline thoughts of self-harm, depression ( β = 0.254, p = .001) and autistic traits ( β = 0.162, p = .007) significantly predicted thoughts of self-harm at 2-year follow-up. Conclusion Despite a lack of support for the hypothesis that wellbeing would moderate the relationship between depression and thoughts of self-harm, correlational data demonstrated significant associations between wellbeing and both depression and thoughts of self-harm. Future research considering psychological wellbeing as a potential protective factor for self-harm in autistic people is warranted.