We examine the effect of India's National Rural Employment Guarantee Scheme (NREGS), one of the largest workfare programs in the world, on human capital investment. Since NREGS increases labor demand, it could increase the opportunity cost of schooling, lowering human capital investment even as incomes increase. We exploit the staged rollout of the program across districts for causal identification. Using a household survey of test scores and schooling outcomes for approximately 2.5 million rural children in India, we show that each year of exposure to NREGS decreases school enrollment by 2 percentage points and math scores by 2% of a standard deviation amongst children aged 13-16. In addition, while the impacts of NREGS on human capital are similar for boys and girls, adolescent boys are primarily substituting into market work when they leave school while adolescent girls are substituting into unpaid domestic work. We find mixed results for younger children. We conclude that anti-poverty programs which raise wages could have the unintended effect of lowering human capital investment.