An investigation into second-harmonic generation from magnetized anharmonic carbon nanotubes (CNTs) mounted on a silica substrate is conducted using a Gaussian laser pulse with modulated amplitude. An intense amplitude-modulated laser pulse incident on the array of CNTs displaces their electrons generating a restoration force. This restoration force is the nonlinear function of displacement of electrons, which ensures the anharmonic behavior of CNTs. Using the paraxial ray approximation, the nonlinear interaction of the incident pulse with CNTs is expressed in terms of a wave equation derived using the perturbative technique. The nonlinear current at second-harmonic frequency arises due to the perturbation of the electron density of CNTs by the ponderomotive force exerted on them by an incident pulse. Numerical outcomes validate the enhanced efficiency of the generated harmonic when considering the phenomenon of self-focusing. With the substantial optical nonlinearities of an anharmonic CNT structure, the plasmon resonance is broadened and high efficiency in generating harmonics is attained. It is seen that the augmenting of the amplitude-modulated parameter of the pulse and the external magnetic field strength enhances system nonlinearity, resulting in increased amplitude of generated second harmonics. Additionally, the effect of the heating rate of CNTs on the efficiency of the generated harmonic is also discussed.