In this paper, a novel robust iterative learning control (ILC) strategy is developed for the magnetically levitated planar motor to achieve a good tracking performance. The robust ILC is mainly synthesized with adaptive sliding mode control (ASMC) technique and ILC. The ASMC with the parameters adaption algorithm can guarantee system stability and disturbance robustness, while the ILC is utilized to reduced the unmodeled repetitive uncertainty and further improve the tracking performance. Since it is impossible to achieve perfect system position resetting for each iteration in practical applications, the error tracking strategy is introduced to handle the nonzero initial error problem of ILC, which can effectively relax the strict zero-error resetting condition in iterative learning. The stability of the proposed robust ILC strategy is proved by the Lyapunov theory. Comparative experiments carried out on the planar motor validate that the proposed robust ILC can effectively meet the challenge of arbitrary initial error in each iteration and achieve good tracking performance.