Background: One of the most fundamental constructs in the positive psychology is the quality of life. Quality of life refers to the emotional, social and physical health of individuals and their ability to do daily activities. Objectives: The present study aimed to investigate the mediating role of resilience in relationship between attachment styles and quality of life. Materials and Methods: The population of the study consisted of all male and female high school students in Babolsar, Iran, in the academic year 2014 - 2015. Participants included 367 high school students (226 female and 141 male) from Babolsar city, Iran, selected by multi-stage cluster sampling method. Participants completed attachment styles, quality of life and resilience scales. The research conceptual model was analyzed and assessed using simultaneous sequential regression method and the steps proposed by Baron and Kenny (1986). All analyses were performed by SPSS ver. 22 software. Results: The obtained results showed that: (1) the secure attachment style was a positive predictor of resilience (P < 0.01) and quality of life (P < 0.01); (2) the insecure attachment avoidant style was a negative predictor of resilience (P < 0.01) and the insecure attachment ambivalent style was a negative predictor of resilience (P < 0.01) and quality of life (P < 0.01); (3) the resilience was a positive predictor of quality of life (P < 0.01); (4) the resilience played the role of a partial mediator between insecure attachment ambivalent style and quality of life (5) the resilience was a complete mediator between secure attachment style and quality of life. Conclusions: This finding confirms the resiliency theory indicating that secure families bring up children resiliently and increase the quality of their lives.