Family dysfunction plays an important role in cyberbullying and cybervictimization. However, little research has investigated the longitudinal relations and the mediating mechanisms between them during adolescence. This study examined the longitudinal relations between family dysfunction and cyberbullying and cybervictimization, along with whether depressive symptoms function as mediators between them at the within-person level. A total of 3,743 Chinese adolescents (46.2% females; Mage = 9.92 years; SD = 0.51) participated a five-wave longitudinal study with a 6-month time interval. The results of random intercept cross-lagged panel model found that: (1) family dysfunction directly predicted depressive symptoms and vice versa at the within-person level; (2) depressive symptoms directly predicted cyberbullying and cybervictimization at the within-person level, but not vice versa; (3) family dysfunction indirectly predicted cyberbullying and cybervictimization via depressive symptoms at the within-person level; (4) at the between-person level, there were significant associations among family dysfunction, depressive symptoms, cyberbullying and cybervictimization. The results are discussed on the basis of the mechanisms that lead to cyberbullying and cybervictimization.