The scaffold protein p62/SQSTM1 is involved in protein turnover and signaling and is commonly found in dense protein bodies in eukaryotic cells. In autophagy, p62 acts as a selective autophagy receptor that recognizes and shuttles ubiquitinated proteins to the autophagosome for degradation. The structural organization of p62 in cellular bodies and the interplay of these assemblies with ubiquitin and the autophagic marker LC3 remain to be elucidated. Here, we present a cryo-EM structural analysis of p62. Together with structures of assemblies from the PB1 domain, we show that p62 is organized in flexible polymers with the PB1 domain constituting a helical scaffold. Filamentous p62 is capable of binding LC3 and addition of long ubiquitin chains induces disassembly and shortening of filaments. These studies explain how p62 assemblies provide a large molecular scaffold for the nascent autophagosome and reveal how they can bind ubiquitinated cargo.