Hepatitis B virus (HBV) is an endemic, chronic virus that leads to 800000 deaths per year. Central to the HBV lifecycle, the viral core has a protein capsid assembled from many copies of a single protein. The capsid protein adopts different (quasi-equivalent) conformations to form icosahedral capsids containing 180 or 240 proteins: T = 3 or T = 4, respectively, in Caspar–Klug nomenclature. HBV capsid assembly has become an important target for recently developed antivirals; nonetheless, the assembly pathways and mechanisms that control HBV dimorphism remain unclear. We describe computer simulations of the HBV assembly, using a coarse-grained model that has parameters learned from all-atom molecular dynamics simulations of a complete HBV capsid and yet is computationally tractable. Dynamical simulations with the resulting model reproduce experimental observations of HBV assembly pathways and products. By constructing Markov state models and employing transition path theory, we identify pathways leading to T = 3, T = 4, and other experimentally observed capsid morphologies. The analysis shows that capsid polymorphism is promoted by the low HBV capsid bending modulus, where the key factors controlling polymorphism are the conformational energy landscape and protein–protein binding affinities.