Two-dimensional (2D) materials exhibiting both second-harmonic generation (SHG) and ferroelectric properties are promising candidates for high-performance optoelectronic devices. However, the relationship between SHG response and ferroelectric polarization and bandgap in such materials has not been revealed clearly. Therefore, by using first-principles calculations based on many-body theory, we comprehensively study the structural, electronic, linear and nonlinear (SHG) properties of ferroelectric NbOCl2 monolayer under strain regulation to clarify the influence of ferroelectric polarization (P-s) and bandgap on the SHG coefficient. Our results show a ferroelectric to nonpolar phase transition under compressive strain larger than 5% along the polar direction. Moreover, under strain, the electronic bandgap, optical gap Eo, and SHG coefficient can be modified to a large extent and show different variation tendencies before and after phase transition. Importantly, a volcano relationship between SHG coefficient and a combined parameter (beta(1) = P-s* E-o) is established. Our findings unambiguously demonstrates the correlation between structural distortion, spontaneous polarization, and SHG property and have important implications for developing ferroelectric and nonlinear optical devices.