Dietary exposure to methylmercury (MeHg) causes irreversible damage to human cognition and is mitigated by photolysis and microbial demethylation of MeHg. Rice (Oryza sativa L.) has been identified as a major dietary source of MeHg. However, it remains unknown what drives the process within plants for MeHg to make its way from soils to rice and the subsequent human dietary exposure to Hg. Here we report a hidden pathway of MeHg demethylation independent of light and microorganisms in rice plants. This natural pathway is driven by reactive oxygen species generated in vivo, rapidly transforming MeHg to inorganic Hg and then eliminating Hg from plants as gaseous Hg°. MeHg concentrations in rice grains would increase by 2.4- to 4.7-fold without this pathway, which equates to intelligence quotient losses of 0.01-0.51 points per newborn in major rice-consuming countries, corresponding to annual economic losses of US$30.7-84.2 billion globally. This discovered pathway effectively removes Hg from human food webs, playing an important role in exposure mitigation and global Hg cycling.