The tripartite-motif protein, TRIM5α, is an innate immune sensor that potently restricts retrovirus infection by binding to human immunodeficiency virus capsids. Higher-ordered oligomerization of this protein forms hexagonally patterned structures that wrap around the viral capsid, despite an anomalously low affinity for the capsid protein (CA). Several studies suggest TRIM5α oligomerizes into a lattice with a symmetry and spacing that matches the underlying capsid, to compensate for the weak affinity, yet little is known about how these lattices form. Using a combination of computational simulations and electron cryo-tomography imaging, we reveal the dynamical mechanisms by which these lattices self-assemble. Constrained diffusion allows the lattice to reorganize, whereas defects form on highly curved capsid surfaces to alleviate strain and lattice symmetry mismatches. Statistical analysis localizes the TRIM5α binding interface at or near the CypA binding loop of CA. These simulations elucidate the molecular-scale mechanisms of viral capsid cellular compartmentalization by TRIM5α.