Lipid membranes are essential to the functioning of cells, enabling the existence of concentration gradients of ions and metabolites. Microbial membrane lipids can contain three-, five-, six- and even seven-membered aliphatic rings, but four-membered aliphatic cyclobutane rings have never been observed. Here we report the discovery of cyclobutane rings in the dominant membrane lipids of two anaerobic ammonium-oxidizing (anammox) bacteria. These lipids contain up to five linearly fused cyclobutane moieties with cis ring junctions. Such `ladderane' molecules are unprecedented in nature but are known as promising building blocks in optoelectronics. The ladderane lipids occur in the membrane of the anammoxosome, the dedicated intracytoplasmic compartment where anammox catabolism takes place. They give rise to an exceptionally dense membrane, a tight barrier against diffusion. We propose that such a membrane is required to maintain concentration gradients during the exceptionally slow anammox metabolism and to protect the remainder of the cell from the toxic anammox intermediates. Our results further illustrate that microbial membrane lipid structures are far more diverse than previously recognized.