A robust-optimal control approach for an electromagnetic levitation system with matched and unmatched uncertainties is proposed in this article. Because of the uncertainties in the dynamics of an electromagnetic levitation system, it is necessary to design a robust control law that will ensure the stability of the system in the presence of these uncertainties. In this framework, the dynamics of an electromagnetic levitation system are addressed in terms of matched and unmatched uncertainties. The robust control problem is translated into the optimal control problem, where the uncertainties of the electromagnetic levitation system are reflected in the cost function. The optimal control method is used to solve the robust control problem. The solution to the optimal control problem for the electromagnetic levitation system is indeed a solution to the robust control problem of the electromagnetic levitation system under matched and unmatched uncertainties. The simulation and experimental results 1 demonstrate the performance of the designed control scheme. The performance indices such as IAE, ISE, ITAE, and ITSE are compared for both uncertainties to showcase the robustness of the designed control scheme.