We present a phase compensation method for an optical phased array (OPA) to manipulate a sharply defined optical beam. Undesirable initial phase distribution caused by non-uniformity of fabrication processes and variation in the characteristics of phase shifters is measured by utilizing phase-shifting digital holography, where a light wave from a waveguide in arrayed waveguides is used as a reference wave and light waves from the other waveguides are used as object waves. The initial phases can be compensated by using the measured result without falling into local optimal solutions. A numerical simulation showed that the initial phases were correctly measured and compensated by using the proposed method. Applications of the proposed compensation method to a fabricated OPA with 16-channel electro-optic polymer waveguides results in obtaining a sharply defined optical beam.