The karyophilic properties of the viral matrix (MA) protein govern HIV nuclear import in nondividing cells such as macrophages. A critical regulator of this process is the C-terminal tyrosine phosphorylation of MA during virus maturation. Here, we reveal the mechanism of this phenomenon, by demonstrating that tyrosine phosphorylation induces the binding of MA to integrase (IN). This leads to the incorporation of MA molecules into virus cores, and subsequently into uncoated viral nucleoprotein complexes. A direct interaction between tyrosine-phosphorylated MA and the central domain of IN can be demonstrated in vitro. It is blocked by phosphotyrosine, indicating that IN recognizes the phosphorylated C-terminal residue of MA. These results explain how the karyophilic potential of MA is conferred to the HIV nucleoprotein complex.