This article proposes a global continuous robust finite-time control (GCRFTC) for a unified power flow controller (UPFC) to improve the transient stability and oscillation damping of power system. First, by using an appropriate coordinate transformation, the nonlinear system of the UPFC is transformed into a nonlinear port-controlled dissipative Hamiltonian (PCDH) system. Second, based on the PCDH system, by utilizing the Hamiltonian structural properties and the “energy shaping plus damping injection” technique, a proper form of a Hamiltonian function is obtained for the PCDH system. Third, using the Hamiltonian function method, finite-time stability criterion and robust control technique, the GCRFTC is designed and theoretically proved, and the chattering phenomena and the high-order frequencies of the power system are avoided effectively.