To address system parameter changes during permanent magnet synchronous motor (PMSM) operation, an H∞ filtering algorithm with a dynamic forgetting factor is proposed for online identification of motor resistance and inductance. First, a standard linear discrete PMSM parameter identification model is established; then, the discrete H∞ filtering algorithm is derived using game theory reducing state and measurement noise influence. A cost function is defined, solving extremes values of different terms. A dynamic forgetting factor is introduced to the weighted combination of initial and current measurement noise covariance matrices, eliminating identification issues from different initial values. On this basis, a dynamic forgetting factor is added to weigh the combination of the initial measurement noise covariance matrix and the current measurement noise covariance matrix, which eliminates the influence of the discrimination error caused by the different initial values. Finally, the identification model is built in MATLAB/Simulink for simulation analysis to verify the feasibility of the proposed algorithm. The simulation results show the proposed H∞ filtering algorithm rapidly and accurately identifies resistance and inductance values with significantly improved robustness. The forgetting factor enables quick stable recognition even with poor initial values, enhancing PMSM control performance.