Due to the prevalence and severe harm of adolescent tobacco and alcohol use, researchers have been paying attention to its influencing factors. From the perspective of the ecological techno-subsystem theory, this study aimed to examine the correlations between deviant peer affiliation, tobacco and alcohol information exposure on social networking sites (SNSs), and adolescent tobacco and alcohol use, as well as the potential protective role of digital literacy. In total, 725 adolescents were recruited to participate in this study. The results showed that deviant peer affiliation was positively associated with adolescent tobacco and alcohol use, SNS tobacco and alcohol information exposure mediated this association, and digital literacy moderated the relationship between SNS information exposure and tobacco and alcohol use. Specifically, the association between SNS tobacco and alcohol information exposure and adolescent tobacco and alcohol use was weaker for those with high digital literacy. These findings not only explore the combined effects of offline and online risk factors but also provide guides for preventing adolescents’ tobacco and alcohol use by cultivating and enhancing digital literacy.