Previous meta-analytic studies have revealed that set-shifting ability contributes to achievement in math and reading equally during childhood, but less is known about whether set-shifting ability plays an equally important role in achievement in different school subjects during high-school learning. To fill this research gap, the current study examined the association between set-shifting ability and academic achievement among 10th-grade Chinese adolescents who attended high school (N = 221). Meanwhile, we further explored the possible mechanisms underlying this association by testing the mediating role of math abilities (i.e., arithmetic and algebraic ability). Setshifting ability was measured through a task-switching task in which participants continuously change task rules based on color and shape sets. Academic achievement was indexed by curriculum-based examination scores. Based on exploratory factor analyses, the achievement scores could be classified into two categories: (a) science and math achievement, including math, physics, chemistry, biology, and geography scores; and (b) humanities achievement, comprising Chinese, English, history, and politics scores. Arithmetic ability and algebraic ability were measured by participants' ability to perform calculations and solve algebraic equations, respectively. Correlation and regression analyses found that set-shifting ability was related to science and math achievement, but not to humanities achievement. Furthermore, the association between set-shifting ability and science and math achievement is partly mediated by algebraic ability. Together, these results suggest that set-shifting ability plays a domain-specific role in achievement. That is, set-shifting ability is specifically linked to science and math achievement in Chinese adolescents, and this specific link may be partly mediated by algebraic ability.