A two-layer target irradiated by an intense laser to generate strong interface magnetic field is proposed. The mechanism is analyzed through a simply physical model and investigated by two-dimensional particle-in-cell simulation. The effect of laser intensity on the resulting magnetic field strength is also studied. It is found that the magnetic field can reach up to several ten megagauss for laser intensity at 1019 Wcm−2.