TRIM5α proteins are restriction factors that protect mammalian cells from retroviral infections by binding incoming viral capsids, accelerating their dissociation, and preventing reverse transcription of the viral genome. Individual TRIM5 isoforms can often protect cells against a broad range of retroviruses, as exemplified by rhesus monkey TRIM5α and its variant, TRIM5-21R, which recognize HIV-1 as well as several distantly related retroviruses. Although capsid recognition is not yet fully understood, previous work has shown that the C-terminal SPRY/B30.2 domain of dimeric TRIM5α binds directly to viral capsids, and that higher-order TRIM5α oligomerization appears to contribute to the efficiency of capsid recognition. Here, we report that recombinant TRIM5-21R spontaneously assembled into two-dimensional paracrystalline hexagonal lattices comprising open, six-sided rings. TRIM5-21R assembly did not require the C-terminal SPRY domain, but did require both protein dimerization and a B-box 2 residue (Arg121) previously implicated in TRIM5α restriction and higher-order assembly. Furthermore, TRIM5-21R assembly was promoted by binding to hexagonal arrays of the HIV-1 CA protein that mimic the surface of the viral capsid. We therefore propose that TRIM5α proteins have evolved to restrict a range of different retroviruses by assembling a deformable hexagonal scaffold that positions the capsid-binding domains to match the symmetry and spacing of the capsid surface lattice. Capsid recognition therefore involves a synergistic combination of direct binding interactions, avidity effects, templated assembly, and lattice complementarity.