A transformer is an important part of power transmission and transformation equipment. Once a fault occurs, it may cause a large-scale power outage. The safety of the transformer is related to the safe and stable operation of the power system. Aiming at the problem that the diagnosis result of transformer fault diagnosis method is not ideal and the model is unstable, a transformer fault diagnosis model based on improved particle swarm optimization online sequence extreme learning machine (IPSO-OS-ELM) algorithm is proposed. The improved particle swarm optimization algorithm is applied to the transformer fault diagnosis model based on the OS-ELM, and the problems of randomly selecting parameters in the hidden layer of the OS-ELM and its network output not stable enough, are solved by optimization. Finally, the effectiveness of the improved fault diagnosis model in improving the accuracy is verified by simulation experiments.