Among an ethnically diverse sample of 803 preadolescent students (ages 9-13 years), the present study examined the associations between students’ perceptions of the student-teacher relationship and their achievement goal orientations. Multilevel analyses showed that students who perceived more closeness in the relationship with their teacher reported a stronger endorsement of mastery goals, particularly when they experienced more emotional problems. This finding was independent of students’ perceptions of peer acceptance. Likewise, perceived relational negativity (conflict and dependency) was associated with a stronger endorsement of performance goals (approach and avoidance). The results were similar for ethnic minority and ethnic majority students, and consistent with an attachment perspective which explains the motivational impact of the student-teacher relationship in terms of the security it provides.