Self-assembly of supramolecular complexes such as viral capsids occurs prominently in nature. Nonetheless, the mechanisms underlying these processes remain poorly understood. Here, we uncover the assembly pathway of hepatitis B virus (HBV), applying fluorescence optical tweezers and high-speed atomic force microscopy. This allows tracking the assembly process in real time with single-molecule resolution. Our results identify a specific, contact-rich pentameric arrangement of HBV capsid proteins as a key on-path assembly intermediate and reveal the energy balance of the self-assembly process. Real-time nucleic acid packaging experiments show that a free energy change of ~1.4 kBT per condensed nucleotide is used to drive protein oligomerization. The finding that HBV assembly occurs via contact-rich energy minima has implications for our understanding of the assembly of HBV and other viruses and also for the development of new antiviral strategies and the rational design of self-assembling nanomaterials.