CpG dinucleotides are suppressed in the genomes of many vertebrate RNA viruses, including HIV-1. The cellular antiviral protein ZAP (zinc finger antiviral protein) binds CpGs and inhibits HIV-1 replication when CpGs are introduced into the viral genome. However, it is not known if ZAP-mediated restriction is the only mechanism driving CpG suppression. To determine how CpG dinucleotides affect HIV-1 replication, we increased their abundance in multiple regions of the viral genome and analyzed the effect on RNA expression, protein abundance, and infectious-virus production. We found that the antiviral effect of CpGs was not correlated with their abundance. Interestingly, CpGs inserted into some regions of the genome sensitize the virus to ZAP antiviral activity more efficiently than insertions into other regions, and this sensitivity can be modulated by interferon treatment or ZAP overexpression. Furthermore, the sensitivity of the virus to endogenous ZAP was correlated with its sensitivity to the ZAP cofactor KHNYN. Finally, we show that CpGs in some contexts can also inhibit HIV-1 replication by ZAP-independent mechanisms, and one of these is the activation of a cryptic splice site at the expense of a canonical splice site. Overall, we show that the location and sequence context of the CpG in the viral genome determines its antiviral activity. IMPORTANCE Some RNA virus genomes are suppressed in the nucleotide combination of a cytosine followed by a guanosine (CpG), indicating that they are detrimental to the virus. The antiviral protein ZAP binds viral RNA containing CpGs and prevents the virus from multiplying. However, it remains unknown how the number and position of CpGs in viral genomes affect restriction by ZAP and whether CpGs have other antiviral mechanisms. Importantly, manipulating the CpG content in viral genomes could help create new vaccines. HIV-1 shows marked CpG suppression, and by introducing CpGs into its genome, we show that ZAP efficiently targets a specific region of the viral genome, that the number of CpGs does not predict the magnitude of antiviral activity, and that CpGs can inhibit HIV-1 gene expression through a ZAP-independent mechanism. Overall, the position of CpGs in the HIV-1 genome determines the magnitude and mechanism through which they inhibit the virus.