We report that the nonlinear optical response of polarity controlled ZnO films grown by selective growth technique of Zn-polar and O-polar ZnO layers on sapphire substrate using Cr-compound buffer layers. ZnO layers grown on CrN/sapphire show Zn polar, while those grown on Cr2O 3/sapphire result in O-polar ZnO films. In order to verify the origin of nonlinear optical response of ZnO, the polarity-controlled ZnO thin films grown on different buffer layers were investigated as nonlinear optical materials for second harmonic generation (SHG). The effective nonlinear optical coefficient (deff) of ZnO grown on Cr-compound buffer layers showed a higher value than that of ZnO grown on MgO buffer layers. Finally, by combining suggested in-situ polarity control technique with photolithography technique, we have fabricated ID and 2D periodically-polarity-inverted (PPI) heterostructures with periodicity ranging from 60 pm to 4 pm. The lateral polarity inversion is confirmed by piezo response microscopy. Such PPI ZnO heterostructures show the enhancement of SHG intensity comparing with the ZnO films.