The effect of the magnetic field applied along the laser propagation direction on the radiation efficiency of high-order harmonics generated from laser-irradiated overdense plasma is investigated theoretically and numerically. We find that the external magnetic field can increase the transmittance of the overdense target, thereby dramatically enhancing the energy coupling between the laser and target. While for the high-order harmonics of the laser reflected from the oscillating target, the radiation efficiency reaches the maximum when the cyclotron frequency of the electrons in the magnetized target approaches the laser frequency. This conclusion applies only to overdense plasmas targets. For targets with low reflectivity, the application of the magnetic field will reduce the harmonic radiation efficiency due to the decrease of both the oscillating coherence and opacity of the target. This work provides a reasonable approach to improving the radiation efficiency of high-order harmonics and a method to estimate the magnitude of the self-generated magnetic field during intense laser-plasma interactions.