We examined the associations between social media use (SMU) and school connectedness and academic performance among middle and high school students, and tested whether age, gender, and school type (i.e., middle school vs. high school) moderated these relationships. We obtained study data from the 2013 cycle of the Ontario Student Drug Use and Health Survey, a representative province-wide cross-sectional survey of students in grades 7 through 12 (N = 10,076). We performed multiple linear regression analyses to examine the nature of the association between SMU and both school connectedness and academic performance. Because school type was a significant moderator of the relationships between social media use and school connectedness, all subsequent analyses were stratified by school type. After adjusting for age, gender, ethnicity, subjective socioeconomic status and substance use, results showed that SMU of 2 h or less per day was positively associated with high levels of school connectedness in high school students (β = 0.402; 95% CI 0.199, 0.605). However, an SMU of more than 2 h per day was negatively associated with school connectedness in middle school students (β = − 0.393; 95% CI − 0.649, − 0.137) and with academic performance in both middle school (β = − 0.153; 95% CI − 0.299, − 0.006) and high school (β = − 0.203; 95% CI − 0.323, − 0.083) students. Results further indicated that the relationship between SMU and school connectedness in high school students significantly varied by age, with stronger associations in older students. Gender was not a significant moderator of the observed relationships. In conclusion, heavy SMU is negatively associated with school connectedness and academic performance among middle and high school students. These results suggest that adolescents should limit their SMU to no more than 2 h per day.