In this work, we analyzed the magnetic activity of 5349 LAMOST low-dispersion spectra of 3539 red giants by calculating equivalent width of magnetic activity lines (Hα, Hβ, Hγ, Hδ, $\rm {Ca~{\small II}\,\,H \& K}$ , $\rm {Ca~{\small II}\,\,IRT}$ ). Combining LAMOST spectral parameters, asteroseismic parameters, and equivalent widths of the magnetic activity lines, an attempt was made to estimate the age of red giants using neural networks. By using the neural networks to select the input parameters, we get the best age estimation of the red giants with the input parameters ‘Teff’, ‘[Fe/H]’, ‘log g’, ‘Vmax’ and ‘ΔV’, which is in line with expectations. The average value of the relative error between the estimated age and the isochronous age is 22.4%. The age estimation was not improved by adding the equivalent widths of more magnetic activity lines. This indicates that the equivalent widths of these spectral lines are not directly related to the age of the red giants. The reason for this might be that the dynamo operating in the outer layers of the red giants has shut off at the end of core-hydrogen-burning. The absence of emission in all the magnetic activity lines of the 5349 LAMOST spectra also confirms this conclusion. In addition, the results indicate that the equivalent widths of the magnetic activity lines are more related to the effective temperature, which is also in line with expectations.