Targeting of the human immunodeficiency virus type 1 (HIV-1) Gag precursor Pr55(gag) to the plasma membrane, the site of virus assembly, is primarily mediated by the N-terminal matrix (MA) domain. N-myristylation of MA is essential for the stable association of Pr55(gag) with membranes and for virus assembly. We now show that single amino acid substitutions near the N terminus of MA can dramatically impair assembly without compromising myristylation. Subcellular fractionation demonstrated that Gag membrane binding was compromised to a similar extent as in the absence of the myristyl acceptor site, indicating that the myristyl group was not available for membrane insertion. Remarkably, the effects of the N-terminal modifications could be completely suppressed by second-site mutations in the globular core of MA. The compensatory mutations enhanced Gag membrane binding and increased viral particle yields above wild-type levels, consistent with an increase in the exposure of the myristyl group. Our results support a model in which the compact globular core of MA sequesters the myristyl group to prevent aberrant binding to intracellular membranes, while the N terminus is critical to allow the controlled exposure of the myristyl group for insertion into the plasma membrane.