The proposed approach in this paper uses a nonlinear model predictive control (NMPC) algorithm to control the swing angle and position of suspended loads using quadrotor UAVs. The system model is based on the Euler-Lagrange method, which considers the two-degree-of-freedom swing angle of the load dependent on the UAV's acceleration. The NMPC controller is implemented through an inner-outer loop control strategy, where the outer loop regulates the position and swing angle of the load, while the inner loop controls the UAV's attitude and altitude. The proposed approach ensures accurate trajectory tracking by suppressing the load swing while maintaining the position of the UAV. Simulation results confirm the effectiveness of the proposed approach. The anti-swing strategy provides a promising solution to the control of suspended loads using quadrotor UAVs, and can have numerous applications in cargo transportation.