During the late phase of HIV type 1 (HIV-1) replication, newly synthesized retroviral Gag proteins are targeted to the plasma membrane of most hematopoietic cell types, where they colocalize at lipid rafts and assemble into immature virions. Membrane binding is mediated by the matrix (MA) domain of Gag, a 132-residue polypeptide containing an N-terminal myristyl group that can adopt sequestered and exposed conformations. Although exposure is known to promote membrane binding, the mechanism by which Gag is targeted to specific membranes has yet to be established. Recent studies have shown that phosphatidylinositol (PI) 4,5-bisphosphate [PI(4,5)P2], a factor that regulates localization of cellular proteins to the plasma membrane, also regulates Gag localization and assembly [Ono, A., Ablan, S. D., Lockett, S. J., Nagashima, K. & Freed, E. O. (2004) Proc. Natl. Acad. Sci. USA 101, 14889-14894]. Here we show that PI(4,5)P2 binds directly to HIV-1 MA, inducing a conformational change that triggers myristate exposure. Related phosphatidylinositides PI, PI(3)P, PI(4)P, PI(5)P, and PI(3,5)P2 do not bind MA with significant affinity or trigger myristate exposure. Structural studies reveal that PI(4,5)P2 adopts an "extended lipid" conformation, in which the inositol head group and 2′-fatty acid chain bind to a hydrophobic cleft, and the 1′-fatty acid and exposed myristyl group bracket a conserved basic surface patch previously implicated in membrane binding. Our findings indicate that PI(4,5)P2 acts as both a trigger of the myristyl switch and a membrane anchor and suggest a potential mechanism for targeting Gag to membrane rafts. © 2006 by The National Academy of Sciences of the USA.