Influenza A virus causes millions of severe cases of disease during annual epidemics. The most abundant protein in influenza virions is matrix protein 1 (M1), which mediates virus assembly by forming an endoskeleton beneath the virus membrane1. The structure of full-length M1, and how it oligomerizes to mediate the assembly of virions, is unknown. Here we determine the complete structure of assembled M1 within intact virus particles, as well as the structure of M1 oligomers reconstituted in vitro. We find that the C-terminal domain of M1 is disordered in solution but can fold and bind in trans to the N-terminal domain of another M1 monomer, thus polymerizing M1 into linear strands that coat the interior surface of the membrane of the assembling virion. In the M1 polymer, five histidine residues-contributed by three different monomers of M1-form a cluster that can serve as the pH-sensitive disassembly switch after entry into a target cell. These structures therefore reveal mechanisms of influenza virus assembly and disassembly.