In this paper, a strategy involving the combination of optimal discrete-time sliding-mode control and recurrent neural networks is proposed for a class of uncertain discrete-time linear systems. First, a performance index based on the reaching law and the control signal is defined. Then, the constrained quadratic programming problem is formulated considering the limitations on the control signal as the static constraint. The dynamic and algebraic model of the neural network is derived based on the optimization conditions of the quadratic problem and their relationship with the projection theory. The proposed method prevents the chattering by selecting proper parameters of the twisting reaching law. The convergence of the neural network is analysed using the Lyapunov stability theory. A singular value-based analysis is employed for robustness of the proposed method. The stability conditions of the discrete-time closed-loop system are analysed by studying eigenvalues of the closed-loop matrix using the singular value approach. The performance of the proposed algorithm is assessed in simulated example in terms of chattering elimination, solution feasibility, and encountering uncertainties and is compared with the recently proposed DSMC methods in the literature.