At present, the research on five-level inverters mainly involves the modulation algorithm and topology, and few articles study the five-level inverter from the control strategy. In this paper, the nonlinear passivity-based control (PBC) method is proposed for single-phase uninterruptible power supply inverters. The proposed PBC method is based on an energy shaping and damping injection idea, which is performed to regulate the energy flow of an inverter to a desired level and to assure global asymptotic stability, respectively. Furthermore, this paper presents a control algorithm based on the theory of passivity that gives an inverter in a photovoltaic system additional functions: power factor correction, harmonic currents compensation, and the ability to stabilize the system under varying injection damping. Finally, the effectiveness of the PBC method in terms of both stability and harmonic distortion is verified by the simulation and experiments under resistive and inductive loads.