Many bacteria produce extracellular and surface-associated components such as membrane vesicles (MVs), extracellular DNA and moonlighting cytosolic proteins for which the biogenesis and export pathways are not fully understood. Here we show that the explosive cell lysis of a sub-population of cells accounts for the liberation of cytosolic content in Pseudomonas aeruginosa biofilms. Super-resolution microscopy reveals that explosive cell lysis also produces shattered membrane fragments that rapidly form MVs. A prophage endolysin encoded within the R- and F-pyocin gene cluster is essential for explosive cell lysis. Endolysin-deficient mutants are defective in MV production and biofilm development, consistent with a crucial role in the biogenesis of MVs and liberation of extracellular DNA and other biofilm matrix components. Our findings reveal that explosive cell lysis, mediated through the activity of a cryptic prophage endolysin, acts as a mechanism for the production of bacterial MVs.