Immunoglobulin M (IgM) plays a pivotal role in both humoral and mucosal immunity. Its assembly and transport depend on the joining chain (J-chain) and the polymeric immunoglobulin receptor (pIgR), but the underlying molecular mechanisms of these processes are unclear. We report a cryo–electron microscopy structure of the Fc region of human IgM in complex with the J-chain and pIgR ectodomain. The IgM-Fc pentamer is formed asymmetrically, resembling a hexagon with a missing triangle. The tailpieces of IgM-Fc pack into an amyloid-like structure to stabilize the pentamer. The J-chain caps the tailpiece assembly and bridges the interaction between IgM-Fc and the polymeric immunoglobulin receptor, which undergoes a large conformational change to engage the IgM-J complex. These results provide a structural basis for the function of IgM.