Second-harmonic generation of the relativistic self-focused chirped laser pulse in plasma has been studied with the exponential plasma density ramp profile in the presence of a planar magnetostatic wiggler. It is evident that the exponential plasma density ramp is helpful in enhancing second-harmonic generation as, with the introduction of the exponential plasma density ramp, self-focusing becomes stronger and hence, it leads to enhance the harmonic generation of the second order in the plasma. Also, it is observed that the efficiency of second-harmonic generation enhances significantly with an increase in the value of the chirp parameter. Further, the magnetostatic wiggler helps in enhancing the harmonic generation of the second order. This is due to the fact that dynamics of the oscillating electrons is altered due to the Lorentz force which, in turn, modifies the plasma wave and, hence, results in the efficient second-harmonic generation.