Geophagy, the craving and purposive consumption of earth, is commonly reported during pregnancy. To date, most studies of geophagy have been cross-sectional and have not assessed its relationship with HIV infection. Therefore, to concurrently examine proposed etiologies of geophagy, a cohort of 371 women with mixed HIV status from Nyanza region, Kenya were recruited in late pregnancy and interviewed about pica at nine time points, through 21 months postpartum. Nutritional status (hemoglobin concentration and food insecurity), physical health (HIV infection and gastrointestinal distress), and psychosocial health (depression and perceived stress) were also repeatedly assessed. Prevalence of geophagy was greatest during pregnancy and decreased significantly postpartum. In a two-level hierarchical linear model, a one-unit increase in average hemoglobin (g/dL) was associated with a 35% decrease in the odds of geophagy. The adjusted odds ratios (CI) of geophagy were 3.98 (2.99, 5.29), 2.54 (1.13, 5.69), and 1.68 (1.15, 2.44) times higher if a woman was pregnant, reported diarrhea in the prior 24 hours, or was HIV positive, respectively. The adjusted odds ratio of geophagy was 1.61 (1.06, 2.45) times higher if a woman reported geophagy during childhood. Our results lend greatest plausibility to the protection hypothesis (i.e., that geophagy occurs in response to compromised immunity and/or infection). Given the high prevalence of geophagy, clinicians should regularly screen for the behavior and measure inflammatory biomarkers before treating geophagy with iron supplements, which can exacerbate some infections.