During herpesvirus infection, egress of nascent viral capsids from the nucleus is mediated by the viral nuclear egress complex (NEC). NEC deforms the inner nuclear membrane (INM) around the capsid by forming a hexagonal array. However, how the NEC coat interacts with the capsid and how curved coats are generated to enable budding is yet unclear. Here, by structure-guided truncations, confocal microscopy, and cryoelectron tomography, we show that binding of the capsid protein UL25 promotes the formation of NEC pentagons rather than hexagons. We hypothesize that during nuclear budding, binding of UL25 situated at the pentagonal capsid vertices to the NEC at the INM promotes formation of NEC pentagons that would anchor the NEC coat to the capsid. Incorporation of NEC pentagons at the points of contact with the vertices would also promote assembly of the curved hexagonal NEC coat around the capsid, leading to productive egress of UL25-decorated capsids.