A deep understanding on the crucial factors of the enhanced macroscopic second harmonic generation (SHG) in some deep-ultraviolet nonlinear optical (NLO) materials is needed to design new NLO materials. Since an optical process relates to the electron excitation and polarization simultaneously, the instantaneous dipole moments and their structures in excitation should be seriously taken account to seek the principal factor in SHG response. In this work, we study the Ba 4 B 11 O 20 F (BBOF), a NLO material, by using the orbital projection technique. From the projected SHG of our theoretic calculation, we recognize the principal dipole moment of the dominant influence on SHG and the relevant atom groups between which the dipole moment is accommodated. With the conclusion that the dipole moment with the most significant influence on SHG is the one between the oxygen-boron polyhedral anion group and barium cation, we predict that Ba 4 Al 11 O 20 F (BAOF) has a comparable SHG response.