Research has shown that mindfulness can reduce students’ negative emotions associated with high-stakes tests and thereby improve test performance. This study explored the association between mindfulness-based intervention (MBI) and high-risk math test scores of middle school students, which is noticeably slim in the domain of mathematics education, through a mediating process involving math-specific test anxiety and math self-efficacy. Using data from a sample of 45 students, age 12–13, we found empirical support for a significant positive correlation between mindfulness and middle school students’ math achievement. Participants listened to a mindfulness audio every other week before a mathematics test. Weekly mathematics test scores, student group discussion data, and in-depth interview data were analyzed to explore how mindfulness affected students’ mathematics test performance, which showed a statistically significant improvement after mindfulness compared to mathematics achievement without the intervention. Our results indicate that mindfulness can relieve mathematics anxiety symptoms, including physiological manifestations, test-unrelated thinking and worries, and problem-solving obstacles caused by mathematics anxiety. Also, mindfulness, especially its non-judgmental attitude, positively affects students’ mathematical self-efficacy. The current research provides evidence of the mindfulness intervention’s efficacy for improving middle school mathematics test performance but also identifies the complexities of implementing it with large numbers of students.