Gravitational-wave emission can lead to the coalescence of close pairs of compact objects orbiting each other1,2. In the case of neutron stars, such mergers may yield masses above the Tolman-Oppenheimer-Volkoff limit (2 to 2.7 solar masses)3, leading to the formation of black holes4. For white dwarfs, the mass of the merger product may exceed the Chandrasekhar limit, leading either to a thermonuclear explosion as a type Ia supernova5,6 or to a collapse forming a neutron star7,8. The latter case is expected to result in a hydrogen- and helium-free circumstellar nebula and a hot, luminous, rapidly rotating and highly magnetized central star with a lifetime of about 10,000 years9,10. Here we report observations of a hot star with a spectrum dominated by emission lines, which is located at the centre of a circular mid-infrared nebula. The widths of the emission lines imply that wind material leaves the star with an outflow velocity of 16,000 kilometres per second and that rapid stellar rotation and a strong magnetic field aid the wind acceleration. Given that hydrogen and helium are probably absent from the star and nebula, we conclude that both objects formed recently from the merger of two massive white dwarfs. Our stellar-atmosphere and wind models indicate a stellar surface temperature of about 200,000 kelvin and a luminosity of about 104.6 solar luminosities. The properties of the star and nebula agree with models of the post-merger evolution of super-Chandrasekhar-mass white dwarfs9, which predict a bright optical and high-energy transient upon collapse of the star11 within the next few thousand years. Our observations indicate that super-Chandrasekhar-mass white-dwarf mergers can avoid thermonuclear explosion as type Ia supernovae, and provide evidence of the generation of magnetic fields in stellar mergers.