This study focuses on the problem of optimal mismatched disturbance rejection control for uncontrollable linear discrete-time systems. In contrast to previous studies, by introducing a quadratic performance index such that the regulated state can track a reference trajectory and minimize the effects of disturbances, mismatched disturbance rejection control is transformed into a linear quadratic tracking problem. The necessary and sufficient conditions for the solvability of this problem over a finite horizon and a disturbance rejection controller are derived by solving a forward–backward difference equation. In the case of an infinite horizon, a sufficient condition for the stabilization of the system is obtained under the detectable condition. Additionally, in combination with the generalized extended state observer, a controller design method is proposed, and the stability analysis of the system under this controller is presented. This paper details our novel approach to disturbance rejection. Finally, four examples are provided to demonstrate the effectiveness of the proposed method.