R-loops are nucleic acid structures formed by an RNA:DNA hybrid and unpaired single-stranded DNA that represent a source of genomic instability in mammalian cells1-4. Here we show that N6-methyladenosine (m6A) modification, contributing to different aspects of messenger RNA metabolism5,6, is detectable on the majority of RNA:DNA hybrids in human pluripotent stem cells. We demonstrate that m6A-containing R-loops accumulate during G2/M and are depleted at G0/G1 phases of the cell cycle, and that the m6A reader promoting mRNA degradation, YTHDF2 (ref. 7), interacts with R-loop-enriched loci in dividing cells. Consequently, YTHDF2 knockout leads to increased R-loop levels, cell growth retardation and accumulation of γH2AX, a marker for DNA double-strand breaks, in mammalian cells. Our results suggest that m6A regulates accumulation of R-loops, implying a role for this modification in safeguarding genomic stability.