The harmonic loss of the main transformer will cause a large waste of power resources and affect the normal use of other equipment. Therefore, a new harmonic loss warning method of power system main transformer based on the whole life cycle of Building Information Modeling (BIM) is proposed. The harmonic loss of the main transformer is calculated from the two aspects of core harmonic loss and winding harmonic loss; Set the harmonic loss warning value according to the relevant standards, analyze the factors that affect the harmonic loss of the main transformer, and send out the corresponding alarm when the harmonic loss reaches the warning value. Through comparative experimental tests with other methods, the results show that the harmonic loss value of the main transformer calculated by the proposed method is the closest to the actual value, and can send out accurate warning alerts after comparing with the warning value.