Particles that bud off from the cell surface, including viruses and microvesicles, typically have a unique membrane protein composition distinct from that of the originating plasma membrane. This selective protein composition enables viruses to evade the immune response and infect other cells. But how membrane proteins sort into budding viruses such as human immunodeficiency virus (HIV) remains unclear. Proteins could passively distribute into HIV-assembly-site membranes producing compositions resembling pre-existing plasma-membrane domains. Here, we demonstrate that proteins instead sort actively into HIV-assembly-site membranes, generating compositions enriched in cholesterol and sphingolipids that undergo continuous remodelling. Proteins are recruited into and removed from the HIV assembly site through lipid-based partitioning, initiated by oligomerization of the HIV structural protein Gag. Changes in membrane curvature at the assembly site further amplify this sorting process. Thus, a lipid-based sorting mechanism, aided by increasing membrane curvature, generates the unique membrane composition of the HIV surface.