In this article, in order to solve the interference compensation control problem of a class of nonlinear systems, we propose a method based on memory data to suppress interference greatly. Firstly, the continuous time model of nonlinear system is discretized to obtain the discrete model of the system, then, which is simplified by zero‐order hold. On this basis, the interference at the previous moment is calculated by using the system states measured and stored at the previous moment, which is added to the systems input to compensate for the interference at the current moment. Finally, the simulation results show that our method has a good inhibitory effect on interference, and the attenuation rate of interference is more than 98%.