The HIV-1 matrix (MA) protein contains two subcellular localization signals with opposing effects. A myristoylated N-terminus governs particle assembly at the plasma membrane, and a nucleophilic motif facilitates import of the viral preintegration complex into the nucleus of nondividing cells. Here, we show that myristoylation acts as the MA dominant targeting signal in HIV-1 producer cells. During virus assembly, a subset of MA is phosphorylated on the C-terminal tyrosine by a virion-associated cellular protein kinase. Tyrosine-phosphorylated MA is then preferentially transported to the nucleus of target cells. An MA tyrosine mutant virus grows normally in dividing cells, but is blocked for nuclear import in terminally differentiated macrophages. MA tyrosine phosphorylation thus reveals the karyophilic properties of this protein within the HIV-1 preintegration complex, thereby playing a critical role for infection of nondividing cells.