The interactions involved in aqueous mixtures of polyethyleneimine (PEI) and cetyltrimethylammonium bromide (CTAB) were studied under dilute conditions. The phase diagram of this polyelectrolyte–surfactant system of similar charge was constructed by determining the CAC and CMC* values at different PEI concentrations, using surface-tension and conductivity measurements, respectively. Formation of thin films at the air–solution interface was detected at concentrations belonging to the interaction region of the phase diagram, using Brewster angle microscopy. These films were formed at low polymer and surfactant concentrations, 0.01% w/v PEI and 0.1 mmol dm−3 CTAB. Results from SAXS determinations indicate that, under these conditions, mesostructure formation occurs exclusively at the surface. The effect of PEI on surfactant micellisation is determined by the polyelectrolyte nature of the polymer. The presence of the polymer in the aggregate significantly affects free micelle formation, even when hydrophobic interactions are mainly determined by the surfactant structure. The films obtained at low surfactant concentration are mesostructured, composed of five layers, each one 49.7 Å thick, as was determined using specular X-ray reflectometry. These results indicate that mesostructured film formation is achievable under more economical and environmentally friendly conditions, suggesting novel routes for surfactant templating in mixed polyelectrolyte systems of similar charge.