Smallholder farming in many developing countries is characterized by low productivity and low quality produce. Low quality limits the price farmers can command and thus their potential income from farming. We conduct a series of measurement and field experiments among smallholder maize farmers in western Uganda to shed light on the barriers to quality upgrading at the farm level and to study its potential in raising productivity and rural incomes. First, we measure maize quality at the farm gate and in the lab and show that quality is low and at least partly observable at the farm gate. Second, we generate exogenous variation in the quality of the maize farmers sell to local markets by offering a randomly selected sub-set a post-harvest service package to improve the quality of their maize. The market return to this quality improvement is zero, suggesting that the market for quality maize is effectively missing. Third, we generate experimental variation in access to a market for premium quality maize, combined with training on agricultural best practices. Over time, the majority of treatment farmers sold maize of high quality. Profit from maize farming in the treatment group increased by 40-80%; an effect driven both by increased productivity and higher prices for both premium and lower quality maize in treatment villages. Fourth, we separately assess the impact of the training intervention and show that extension service alone does not lead to a change in farmers’ practices or agricultural outcomes. Our findings reveal the importance of demand-side constraints in limiting rural income and productivity growth.