This work reports the results of the vibrational corrections and frequency dependence to the first hyperpolarizabilities of the alkali-and alkaline-earth-doped boron nitride nanotubes. The electronic contributions were computed by means of the density functional theory with the M06-2X functional, and the vibrational corrections were calculated using the perturbation theoretical method and the field-induced coordinates methodology. The results for the electronic contribution show that such materials exhibit large first hyperpolarizabilities and electride characteristic. We also show that the distribution of the excess electron, which originates from the doping atoms, plays an important role in the large electronic hyperpolarizabilities (β el). Moreover, our findings strongly indicate that the effect of vibrations on the hyperpolarizabilities can be quite important and can even be much larger than the electronic counterpart.