For schooling to play an important role in the development of human capital, the system of education needs to provide quality education, which among other things requires high-quality teachers. Facing fiscal constraints and growing enrolments, school systems in developing countries often supplement their teaching staff by hiring contract teachers. However, there is limited evidence on how the effectiveness of these teachers compares to that of civil service teachers. We use a dataset from rural primary schools in western China to estimate the causal effect of contract teachers on student achievement and find that gains in student scores on standardised examinations in mathematics and Chinese are less in classes taught by contract teachers than in classes taught by civil service teachers. The results demonstrate that China’s education system needs to focus on producing high-quality teachers to improve the quality of schooling in its rural education system. The findings imply that educators in developing countries should not only seek to hire increasingly more civil service teachers in rural schools, but they should also identify ways of improving the quality of contract teachers. If efforts to improve teaching can succeed, rural students can learn more, earn higher incomes and contribute more to the productivity of the overall economy.