Vertebrate genomes exhibit marked CG suppression—that is, lower than expected numbers of 5′-CG-3′ dinucleotides1. This feature is likely to be due to C-to-T mutations that have accumulated over hundreds of millions of years, driven by CG-specific DNA methyl transferases and spontaneous methyl-cytosine deamination. Many RNA viruses of vertebrates that are not substrates for DNA methyl transferases mimic the CG suppression of their hosts2,3,4. This property of viral genomes is unexplained4,5,6. Here we show, using synonymous mutagenesis, that CG suppression is essential for HIV-1 replication. The deleterious effect of CG dinucleotides on HIV-1 replication was cumulative, associated with cytoplasmic RNA depletion, and was exerted by CG dinucleotides in both translated and non-translated exonic RNA sequences. A focused screen using small inhibitory RNAs revealed that zinc-finger antiviral protein (ZAP)7inhibited virion production by cells infected with CG-enriched HIV-1. Crucially, HIV-1 mutants containing segments whose CG content mimicked random nucleotide sequence were defective in unmanipulated cells, but replicated normally in ZAP-deficient cells. Crosslinking-immunoprecipitation-sequencing assays demonstrated that ZAP binds directly and selectively to RNA sequences containing CG dinucleotides. These findings suggest that ZAP exploits host CG suppression to identify non-self RNA. The dinucleotide composition of HIV-1, and perhaps other RNA viruses, appears to have adapted to evade this host defence.