The invention relates to a method for controlling a three-phase photovoltaic grid-connected inverter when a power grid voltage is unbalanced. The method comprises the steps of establishing a three-phase photovoltaic grid-connected system main circuit and an inverter control system, collecting signals, carrying out clark transform, synchronizing power grids, extracting the phase sequence, calculating a reference current, controlling a current loop, carrying out inverse clark transform, controlling PWM and driving an inverter. The method has the advantages that a photovoltaic power source is efficiently connected to the power grids under the situation that the power grids are normal; the grid-connected current harmonics are effectively eliminated through an LCL filter, and high-power factor grid connection is achieved through a PR current controller; when the power grids break down, the faults can be omitted, and three control targets of voltage supporting, voltage balancing and power vibration eliminating are achieved.