A classical nova occurs when material accreting onto the surface of a white dwarf in a close binary system ignites in a thermonuclear runaway. Complex structures observed in the ejecta at late stages could result from interactions with the companion during the common-envelope phase. Alternatively, the explosion could be intrinsically bipolar, resulting from a localized ignition on the surface of the white dwarf or as a consequence of rotational distortion. Studying the structure of novae during the earliest phases is challenging because of the high spatial resolution needed to measure their small sizes. Here we report near-infrared interferometric measurements of the angular size of Nova Delphini 2013, starting one day after the explosion and continuing with extensive time coverage during the first 43 days. Changes in the apparent expansion rate can be explained by an explosion model consisting of an optically thick core surrounded by a diffuse envelope. The optical depth of the ejected material changes as it expands. We detect an ellipticity in the light distribution, suggesting a prolate or bipolar structure that develops as early as the second day. Combining the angular expansion rate with radial velocity measurements, we derive a geometric distance to the nova of 4.54 ± 0.59 kiloparsecs from the Sun.