Abstract The widely used model predictive control of discrete-time control barrier functions (MPC-CBF) has difficulties in obstacle avoidance for unmanned ground vehicles (UGVs) in complex terrain. To address this problem, we propose adaptive dynamic control barrier functions (AD-CBF). AD-CBF is able to adaptively select an extended class of functions of CBF to optimize the feasibility and flexibility of obstacle avoidance behaviors based on the relative positions of the UGV and the obstacle, which in turn improves the obstacle avoidance speed and safety of the MPC algorithm when integrated with MPC. The algorithmic constraints of the CBF employ hierarchical density-based spatial clustering of applications with noise (HDBSCAN) for parameterization of dynamic obstacle information and unscaled Kalman filter (UKF) for trajectory prediction. Through simulations and practical experiments, we demonstrate the effectiveness of the AD-CBF-MPC algorithm in planning optimal obstacle avoidance paths in dynamic environments, overcoming the limitations of the point-by-point feasibility of MPC-CBF.