At present, the control strategy to prevent the line power from exceeding the limit is adopted in the UPFC demonstration project, and the UPFC system-level control strategy needs to be further studied and improved. In this paper, a method of security and stability preventive control based on UPFC is proposed. Aiming at the expected fault security and stability problem found in the online security and stability assessment of power dispatching center, based on the calculation of the sensitivity of line overload and bus voltage overrun control, the active / reactive power flow control value of UPFC line series terminal and the reactive power control value of parallel terminal are obtained and executed. This method further expands the application range of UPFC system level function, and an example of an actual power grid verifies the effectiveness of the method.