Writing presents considerable challenges to students’ motivation. Yet there is a dearth of studies assessing the role of affect and motivation in writing performance for students with migration backgrounds (MB), who often underachieve in writing. Our study addressed this research gap by investigating the interplay between writing self-efficacy, writing anxiety, and text quality in 208 secondary students with and without MB using Response Surface Analyses. The data showed comparable levels of self-efficacy and, notably, lower writing anxiety levels among students with MB despite lower writing achievements. In the full sample, we observed positive correlations between self-efficacy and text quality and negative correlations between writing anxiety and text quality. When modeling efficacy and anxiety measures and their interplay to predict text quality, self-efficacy measures continued to account for statistically detectable unique variance in text quality, whereas writing anxiety did not. However, students with MB demonstrated differing interplay patterns, with less efficacious students with MB showing positive relations between writing anxiety and text quality.