Bacteria encode myriad defenses that target the genomes of infecting bacteriophage, including restriction-modification and CRISPR/Cas systems. In response, one family of large bacteriophage employs a nucleus-like compartment to protect their replicating genomes by excluding host defense factors. However, the principle composition and structure of this compartment remain unknown. Here, we find that the bacteriophage nuclear shell assembles primarily from one protein, termed chimallin. Combining cryo-electron tomography of nuclear shells in bacteriophage-infected cells and cryo-electron microscopy of a minimal chimallin compartment in vitro, we show that chimallin cooperatively self-assembles as a flexible sheet into closed micron-scale compartments. The architecture and assembly dynamics of the chimallin shell suggest mechanisms for its nucleation and growth, and its role as a scaffold for phage-encoded factors mediating macromolecular transport, cytoskeletal interactions, and viral maturation.