Pyrenoids are subcompartments of algal chloroplasts that concentrate Rubisco enzymes and their CO2 substrate, thereby increasing the efficiency of carbon fixation. Diatoms perform up to 20% of global CO2 fixation, but their pyrenoids remain poorly characterized at a molecular level. Here, we used in vivo photo-crosslinking to catalogue components of diatom pyrenoids and identified a pyrenoid shell (PyShell) protein, which we localized to the pyrenoid periphery of both the pennate diatom, Pheaodactylum tricornutum, and the centric diatom, Thalassiosira pseudonana. In situ cryo-electron tomography (cryo-ET) revealed that the pyrenoids of both diatom species are encased in a lattice-like protein sheath. Disruption of PyShell expression in T. pseudonana resulted in the absence of this protein sheath, altered pyrenoid morphology, and a high-CO2 requiring phenotype, with impaired growth and reduced carbon fixation efficiency under standard atmospheric conditions. Pyrenoids in mutant cells were fragmented and lacked the thylakoid membranes that normally traverse the Rubisco matrix, demonstrating how the PyShell plays a guiding role in establishing pyrenoid architecture. Recombinant PyShell proteins self-assembled into helical tubes, enabling us to determine a 3.0 Å-resolution PyShell structure. We then fit this in vitro structure into an in situ subtomogram average of the pyrenoid's protein sheath, yielding a putative atomic model of the PyShell within diatom cells. The structure and function of the diatom PyShell provides a new molecular view of how CO2 is assimilated in the ocean, a crucial biome that is on the front lines of climate change.