YouTube is a popular video-sharing platform where viewers can watch videos made by media performers called YouTubers. YouTube is a social media site conducive to the development of parasocial relationships, which consists in asymmetrical relationships between media users and media performers. The aim of this study is to identify the determinants of YouTube addiction by examining the relationships between social anxiety, parasocial relationships with YouTubers and YouTube addiction based on a cognitive-behavioral theoretical framework. Data from 932 participants were collected through an online survey. Multiple regression analyses and structural equation modeling using a bootstrap procedure reveal that 1) social anxiety and 2) parasocial relationships with YouTubers are predictors of YouTube addiction, 3) social anxiety is a predictor of parasocial relationships, 4) social anxiety moderates the relation between parasocial relationships and YouTube addiction, 5) parasocial relationships mediate the relation between social anxiety and YouTube addiction and 6) social anxiety also moderates this mediated effect. The proposed moderated-mediation model of YouTube addiction fits well the data. The findings of this study contribute to the literature on the parasocial compensation hypothesis while providing useful information for prevention and intervention for YouTube addiction and social anxiety disorder.