Early relationships with teachers play an important role in children's development and significantly influence students' cognitive and academic performance. Studies suggest that working memory (WM) is a strong predictor of academic achievement, especially of reading and arithmetic outcomes. The associations between teacher-student relationship (TSR) quality, children's WM skills and their academic performance have been reported in numerous observational studies. However, the potentially bidirectional and temporal nature of the relationships between these constructs is understudied. The purpose of this study was to investigate the relationships between primary school children's WM and TSR by applying a cross-lagged design and measuring these constructs at three time points throughout the academic year. More exploratively, this study investigated how WM and TSR bidirectionally relate to children's academic performance. The findings of this study revealed a temporal relationship between WM and TSR: between WM-related problems in the classroom at baseline and conflict at 3-month follow-up, and between closeness at 3-month follow-up and WM-related problems in the classroom at 5-month follow-up. Moreover, the findings showed a bidirectional relationship between arithmetic performance and WM-related problematic behaviour. This study highlights that relationships between the teacher and students play an important role in supporting students' cognitive and academic development. Importantly, this study suggests that children with WM problems may benefit from interventions that focus on improving their relationships with teachers. Additionally, the findings propose that interventions targeting WM may also have positive effects on children's academic performance.