Piezoelectric actuators (PEAs) are widely applied in various nanopositioning equipment. However, the strong hysteresis nonlinearity compromises the positioning accuracy. In this work, a novel modified Bouc‐Wen (MBW) model with a polynomial function of the differential of the input is established for modelling the hysteresis nonlinearity of the PEA‐actuated nanopositioning stages. The particle swarm optimisation algorithm is adopted to identify the parameters of the MBW model with a set of input–output experimental data. The obtained model with the corresponding identification parameters matches well the experimental data with 0.31% relative error. A feedforward compensator based on the obtained model is also applied to compensate the hysteresis nonlinearity. Experiments are conducted to validate the effectiveness of this approach, and the results show the great improvement of positioning accuracy of the stage.