The formation of voids in an irradiated material significantly degrades its physical and mechanical properties. Void nucleation and growth involve discrete atomic-scale processes that, unfortunately, are not yet well understood due to the lack of direct experimental examination. Here we report an in-situ atomic-scale observation of the nucleation and growth of voids in hexagonal close-packed magnesium under electron irradiation. The voids are found to first grow into a plate-like shape, followed by a gradual transition to a nearly equiaxial geometry. Using atomistic simulations, we show that the initial growth in length is controlled by slow nucleation kinetics of vacancy layers on basal facets and anisotropic vacancy diffusivity. The subsequent thickness growth is driven by thermodynamics to reduce surface energy. These experiments represent unprecedented resolution and characterization of void nucleation and growth under irradiation, and might help with understanding the irradiation damage of other hexagonal close-packed materials.