Agricultural and other physically demanding sectors are important sources of growth in developing countries, but prevalent diseases such as malaria can adversely impact the productivity and labor supply of workers. We estimate the impact of malaria infection on worker earnings, labor supply, daily productivity, and task selection by using a phased-in design where we randomize the study week in which piece-rate workers at a large sugarcane plantation in Nigeria are offered malaria testing and treatment. Two estimation strategies indicate a significant and substantial intent to treat effect of the intervention. The program increases worker weekly earnings by 11%-13% over the weeks following the offer, depending on the reference period, estimated using a between-worker estimator that exploits the experimental design. A within-worker estimate provides similar but smaller estimates of 8%-10%. We identify different pathways through which this effect occurs. For workers who test positive for malaria, the treatment of illness principally increases labor supply, leading to higher earnings. For workers who test negative, the health information leads to increased earnings via augmented daily productivity. This productivity response arises, in part, from selection into higher return tasks within their job at the plantation. The results underline the importance of medical treatment but also of improved access to information about one's health status, as the absence of either leads workers to work less or choose lower return tasks when working.