Adverse childhood experiences (ACEs) have been linked with attachment insecurity and psychopathology. However, some individuals remain securely attached and resilient following ACEs. Researchers have examined polymorphisms in the oxytocin receptor gene (OXTR), particularly rs53576, as a source of resilience, though examination of the biological mechanism by which rs53576 buffers the relation that would otherwise exist between ACEs and attachment insecurity is absent. The aim of the current study was to examine how ACEs interact with individual genetic and immune vulnerability to shape attachment security in older adolescents and young adults (n = 201). Moderated mediational models were tested in which ACEs acted as independent variables, attachment security acted as a dependent variable, inflammation (i.e., IL-6) was tested as a mediator, and rs53576 (i.e., AA, AG, GG genotypes) was tested as a moderator. Results indicated that physical abuse was significantly associated with decreased attachment security, with moderation by rs53576. A significant main effect of rs53576 on IL-6 was also noted. A similar pattern of results was evident across other ACEs and suggests that the effects of ACEs on attachment are buffered by the GG genotype. Association between GG and lower IL-6 suggests inflammation plays some role, though more research is needed.