In formation of the HIV-1 virus particle, a short, 14-amino acid segment called SP1, located in the Gag structural protein1, plays a critical role. During virus assembly the SP1 peptide and seven preceding residues fold into a six-helix bundle (6HB) that holds together the Gag hexamer and facilitates formation of a curved immature hexagonal lattice underneath the viral membrane2,3. Upon completion of assembly and budding, proteolytic cleavage of Gag leads to virus maturation, in which the immature lattice is broken down; the liberated CA domain of Gag then re-assembles into the mature conical capsid that encloses the viral genome and associated enzymes. Folding and proteolysis of the 6HB are critical rate-limiting steps of both Gag assembly and disassembly, and the 6HB is an established target of HIV-1 inhibitors4,5. Using a combination of structural and functional analyses, we show here that inositol hexakisphosphate (IP6) facilitates formation of the 6HB and assembly of the immature HIV-1 Gag lattice. IP6 makes ionic contacts with two rings of lysine residues at the center of the Gag hexamer. Proteolytic cleavage then unmasks an alternative binding site, where IP6 interaction promotes assembly of the mature capsid lattice. These studies identify IP6 as a naturally occurring small molecule that promotes both HIV-1 assembly and maturation.