Using confocal microscopy, we studied the effect of heating (up to 85°C) on the microstructure of β-lactoglobulin-stabilized emulsions (20 vol% oil, pH 6.8) containing excess protein (total protein content 13.2%). Two different fluorescent dyes were used to separately visualize the oil droplets and the protein. In overlay micrographs, their location with respect to each other could then be determined. In the presence of a low salt concentration, flocculation of the emulsion without surfactant was inhibited, by a mechanism analogous to the "salting-in" of aqueous protein solutions. Addition of the anionic surfactant sodium dodecyl sulfate (SDS) caused weak flocculation, probably as a result of the formation of protein−SDS complexes. The final heat-set emulsion contained distinct pores for a surfactant/protein ratio of R = 1, but no pores for R = 2. Addition of the cationic surfactant cetyl trimethyl ammonium bromide (CTAB) caused strong aggregation, as indicated by microscopic observation of the concentrated emulsion and light scattering of the diluted emulsion. For R = 1 with CTAB, there were aggregates consisting of oil droplets and excess protein. At R = 2, almost all the excess protein was aggregated into separate protein flakes. In the final emulsion gels containing CTAB, the protein was more spread out. Differing structural behavior with anionic and cationic surfactants has been interpreted in terms of different protein−surfactant interactions in aqueous solution and at the oil−water interface, both before and after protein denaturation.