The success of colloidal semiconductor nanocrystals (NCs) in science and optoelectronics is inextricable from their surfaces. The functionalization of lead halide perovskite (LHP) NCs1-5 poses a formidable challenge due to their structural lability, unlike the well-established covalent ligand-capping of conventional semiconductor NCs6,7. We posited that the vast and facile molecular engineering of phospholipids as zwitterionic surfactants can deliver highly customized surface chemistries for metal halide NCs. Molecular dynamics simulations inferred that ligand-NC surface affinity is primarily governed by the structure of the zwitterionic headgroup, particularly by the geometric fitness of the anionic and cationic moieties into the surface lattice sites, as corroborated by the NMR and FTIR data. Lattice-matched primary-ammonium phospholipids enhance the structural and colloidal integrity of hybrid organic-inorganic LHPs (FAPbBr3 and MAPbBr3, FA-formamidinium; MA-methylammonium) and lead-free metal halide NCs. The molecular structure of the organic ligand tail governs the long-term colloidal stability and compatibility with solvents of diverse polarity, from hydrocarbons to acetone and alcohols. These NCs exhibit photoluminescence quantum yield (PL QY) above 96% in solution and solids and minimal PL intermittency at the single particle level with an average ON fraction as high as 94%, as well as bright and high-purity (ca. 95%) single-photon emission.