This paper investigates the switched dynamic modeling and excitation control of multi-area power systems under emergency conditions, such as generator tripping and load shedding. First, a switched dynamic model for a three-machine multi-area power system is put forward. Then, the switched power system is transformed to its equivalent switched dissipative Hamiltonian system, based on which a switching excitation controller is constructed. Using the Hamiltonian functions of the subsystems as multiple Lyapunov functions, the stability of the closed-loop system under arbitrary switching path is analyzed. Simulation results demonstrate that the proposed switching controller can effectively improve the transient stability of the power system under emergency.