We present magnetohydrodynamic numerical simulations of the late post-supernova hypercritical accretion to understand its effect on the magnetic field of the new-born neutron star. We consider as an example the case of a magnetic field loop protruding from the stars surface. The accreting matter is assumed to be non magnetized and, due to the high accretion rate, matter pressure dominates over magnetic pressure. We find that an accretion envelope develops very rapidly and once it becomes convectively stable the magnetic field is easily buried and pushed into the newly forming neutron star crust. However, for low enough accretion rates the accretion envelope remains convective for an extended period of time and only partial submergence of the magnetic field occurs due to a residual field that is maintained at the interface between the forming crust and the convective envelope. In this latter case, the outcome should be a weakly magnetized neutron star with a likely complicated field geometry. In our simulations we find the transition from total to partial submergence to occur around dotM ~ 10 M_sun/yr. Back-diffusion of the submerged magnetic field toward the surface, and the resulting growth of the dipolar component, may result in a delayed switch-on of a pulsar on time-scales of centuries to millenia.