Self-fertilization (selfing) favours reproductive success when mate availability is low, but renders populations more vulnerable to environmental change by reducing genetic variability. A mixed-breeding strategy (alternating selfing and outcrossing) may allow species to balance these needs, but requires a system for regulating sexual identity. We explored the role of DNA methylation as a regulatory system for sex-ratio modulation in the mixed-mating fish Kryptolebias marmoratus. We found a significant interaction between sexual identity (male or hermaphrodite), temperature and methylation patterns when two selfing lines were exposed to different temperatures during development. We also identified several genes differentially methylated in males and hermaphrodites that represent candidates for the temperature-mediated sex regulation in K. marmoratus. We conclude that an epigenetic mechanism regulated by temperature modulates sexual identity in this selfing species, providing a potentially widespread mechanism by which environmental change may influence selfing rates. We also suggest that K. marmoratus, with naturally inbred populations, represents a good vertebrate model for epigenetic studies.