In this study, we propose a novel method that integrates Nonlinear Model Predictive Contour Control (NMPCC) with an Exponentially Stabilizing Control Lyapunov Function (ES-CLF) and Exponential Higher-Order Control Barrier Functions to achieve stable path-following and obstacle avoidance in UAV systems. This framework enables uncrewed aerial vehicles (UAVs) to safely navigate around both static and dynamic obstacles while strictly adhering to desired paths. The quaternion-based formulation ensures precise orientation and attitude control, while a robust optimization solver enforces the constraints imposed by the Control Lyapunov Function (CLF) and Control Barrier Functions (CBF), ensuring reliable real-time performance. The proposed method was experimentally validated using a DJI Matrice 100 quadrotor platform, considering scenarios with prior knowledge of obstacle locations. Results demonstrate the controller’s effectiveness in minimizing orthogonal and tangential tracking errors, ensuring stability and safety in complex environments.