High-field magnetic white dwarfs have been long suspected to be the result of stellar mergers. However, the nature of the coalescing stars and the precise mechanism that produces the magnetic field are still unknown. Here we show that the hot, convective, differentially rotating corona present in the outer layers of the remnant of the merger of two degenerate cores is able to produce magnetic fields of the required strength that do not decay for long timescales. We also show, using an state-of-the-art Monte Carlo simulator, that the expected number of high-field magnetic white dwarfs produced in this way is consistent with that found in the solar neighborhood.