Wind energy is a useful and reliable energy source. Wind turbines are attracting attention with the dependency of the world on clean energy. The turbulent nature of wind profiles along with uncertainty in the modeling of wind turbines makes them more challenging for prolific power extraction. The pitch control angle is used for the effective operation of wind turbines at the above-nominal wind speed. To extract stable power as well as to keep wind turbines in a safe operating region, the pitch controller should be intelligent and highly efficient. For this purpose, proportional-integral-derivative controllers are mostly used. The parameters for the proportional-integral-derivative controller are unknown and calculated by numerous techniques, which is a quite cumbersome task. In this research, the particle swarm optimization technique is used but the conventional particle swarm optimization technique cannot tackle the system's nonlinearity and uncertainties. Hence, the proposed particle swarm optimization algorithm is employed for the calculation of the controller's optimal parameters. The proposed technique is implemented on a 5-MW wind turbine, which is designed using the Bladed software. Simulation is performed using MATLAB/Simulink to validate the effectiveness of the proposed technique. A variable wind profile is fed as input into the system and the proposed controller provides satisfactory results for the power, rotor speed, and torque. The system is stable and the settling time is reduced.