The proportional integral derivative (PID) controller plays a crucial role in various industrial applications. However, conventional methods often fail to provide optimal parameter values. Therefore, this study proposes a novel version of the jellyfish search (JS) algorithm, the modified jellyfish search (mJS) algorithm, for optimally tuning PID controllers to regulate the speed of a direct current (DC) motor. The original JS algorithm is known for its nature‐inspired approach; however, it has limitations in terms of exploitation power. To address these issues, the proposed mJS incorporates quasi‐dynamic opposed‐based learning and a Weibull probability distribution. The objective function minimizes the integral of the time‐weighted absolute error (ITAE). The effectiveness of mJS was validated by solving the 23rd classical benchmark function, followed by a comparative analysis with contemporary optimization algorithms using stringent statistical criteria. Then mJS is then applied to optimize the PID parameters of three different DC motor models. Results show that the mJS outperforms the standard JS, gray wolf optimization (GWO), JAYA, and golden jackal optimization (GJO) for various performance indicators. Specifically, the best ITAE values were 3.274e6 for DC motor 1 using the JS algorithm, 0.002737 for DC motor 2 using the GJO algorithm, and 0.02785 for DC motor 3 using the mJS algorithm. Additionally, the mJS and JS algorithms reduced the settling time to 0.005 s for DC motor 1, whereas the best settling time of 0.325 s for DC motor 2 was achieved by the mJS algorithm, and a settling time of 1.19 s was recorded for DC motor 3 using both the mJS and JS algorithms. These findings underscore the practical importance of the developed optimizer in engineering applications and its significant contribution to the literature.