In electric machine design, efficient methods for the optimization of the geometry and associated parameters are essential. Nowadays, it is necessary to address the uncertainty caused by manufacturing or material tolerances. This work presents a robust optimization strategy to address uncertainty in the design of a three-phase, six-pole permanent magnet synchronous motor (PMSM). The geometry is constructed in a two-dimensional framework within MATLAB®, employing isogeometric analysis (IGA) to enable flexible shape optimization. The main contributions of this research are twofold. First, we integrate shape optimization with parameter optimization to enhance the performance of PMSM designs. Second, we use robust optimization, which creates a min–max problem, to ensure that the motor maintains its performance when facing uncertainties. To solve this bilevel problem, we work with the maximal value functions of the lower-level maximization problems and apply a version of Danskin’s theorem for the computation of generalized derivatives. Additionally, the adjoint method is employed to efficiently solve the lower-level problems with gradient-based optimization. The paper concludes by presenting numerical results showcasing the efficacy of the proposed robust optimization framework. The results indicate that the optimized PMSM designs not only perform competitively compared to their non-robust counterparts but also show resilience to operational and manufacturing uncertainties, making them attractive for industrial applications.