A generic compact modeling approach for emerging memories is developed in this work. State transitions, as well as the electric properties of each state, usually require separate efforts from a physics perspective. To accelerate memory modeling, a data-driven approach is explored with the recurrent Non-linear Auto Regressive with Exogenous inputs (NARX) network. The recurrent module captures the state transition dynamics, while a feedforward module is responsible for the non-linear states, such as high and low resistance states. The generic NARX-based model is demonstrated with high accuracy for emerging memories of different physics, such as resistive random-access-memory (ReRAM) and ferroelectric tunnel junction (FTJ). It is extendable to statistical modeling which is useful to cover memory variations. Circuit simulations are demonstrated with successful convergence, attributed to the capability of the NARX network and its compatibility with simulators.