Adolescents’ health behavior is promoted by their social relationships, and social isolation may affect their health and use of health care services. No previous studies have examined the quality of social relationships and health care service use from adolescence to young adulthood. We investigated the associations between the quality of the social relationships, depression, and the utilization of primary health care services by adolescents and young adults. The participants (n = 793, aged 13-18 years) were from a general population sample who attended a five-year follow-up study. Data on health care service utilization were obtained from primary health care registers. Self-rated questionnaires were used at two time points, and the associations between the number of visits to health services and background factors were analyzed using generalized linear models. The mediating effect of depressive symptoms on the relationship between loneliness and health service use was assessed with a simple mediation model. Young age, female gender, and symptoms of depression associated with a higher number of visits to health care services during the follow-up period. Loneliness in males and poor relationships with peers in females associated with a lower number of health care service visits. Furthermore, the effect of loneliness on health service visits was mediated by symptoms of depression. The quality of social relationships in adolescence may affect the utilization of health care services, and the role of social relationships in health care service utilization differs between males and females.