In this paper, an adaptive dynamic programming discrete‐time linear quadratic Riccati (ADP‐DTLQR) control is designed for an electromagnetic levitation system (EMS) to track the reference trajectories and preserve stability in severe situations efficiently. The EMS system has a strongly nonlinear and unstable dynamic in nature. The ADP‐DTLQR approach is a novel method based on the Q‐learning algorithm for unknown discrete‐time systems in a causal manner. The ADP‐DTLQR can determine the online gains of the controller in different conditions as a model‐free structure, which can minimize the combination of state errors and control efforts of the systems. Moreover, the DTLQR controller and linear matrix inequality controller on the EMS system are designed and compared with the present strategy in different scenarios in the simulation section to verify the robustness and strongness of the proposed method. The evaluation of simulation results demonstrates that the proposed control scheme is suitable not only for preserving the levitated object stability but also for compensating the disturbances and uncertainties in the EMS structure.