We report the formation and the role of defect dipoles in Fe doped Pb(Zr0.52Ti0.48)O3 (PZT) epitaxial thin film grown on SRO/LSAT substrate by pulsed laser deposition. The observed enhancement of spontaneous polarization in Nb-doped PZT thin film is found to be due to easy orientation and mobility of domain walls. The presence of defect complexes in Fe doped PZT film is responsible for the voltage offset or asymmetric polarization versus electric field hysteresis loop. Topography and nanoscale polarization switching of pure and doped PZT films are investigated by piezo force microscopy. X-ray photoelectron spectroscopy (XPS) study is used to confirm the presence of defect dipoles in Fe-doped PZT thin film. Detailed analysis of the XPS spectra also revealed that the defect dipoles are only formed in the Fe doped system and is absent in Nb- modified PZT thin film. © 2019 IOP Publishing Ltd.