This paper focuses on the delay-dependent stability of a class of generalized neural networks (NNs) with time-varying delays. A free-matrix-based inequality is presented by introducing a set of slack variables, which encompasses the Wirtinger-based inequality as a special case. Then, by constructing a suitable Lyapunov–Krasovskii functional and utilizing the new inequality to bound the derivative of the Lyapunov–Krasovskii functional, some sufficient conditions are derived to assure the stability of the considered neural networks. Three numerical examples are provided to demonstrate the effectiveness and the significant improvement of the proposed method.