Second harmonic generation from amorphous SiOx thin films prepared by sputtering was investigated under a nanosecond pulse excitation at 1064 nm. The investigation over a wide range of preparation conditions, i.e. excess Si concentration (CexSi) and annealing temperature, revealed that the effective second-order nonlinear optical coefficient (deff) reaches up to 0.59 pm V−1, which is comparable to that of α-quartz. The origin was discussed based on the results of x-ray photoelectron spectroscopy, electron spin resonance spectroscopy, and photoluminescence spectroscopy. A correlation was found between the ratio of deff to CexSi and the peak energy of the photoluminescence, suggesting that Si clusters are the most probable origin of the second-order nonlinearity.