This article focuses on the safe trajectory tracking of a heterogeneous multiunmanned ground vehicle system (HMUGVS) by considering decentralized control. Based on the relative position and velocity between unmanned ground vehicles (UGVs), a control barrier function for heterogeneous systems is specifically designed, which directly incorporates the dynamic characteristics of different UGVs to ensure collision avoidance. Meanwhile, an independent control Lyapunov function is constructed for each heterogeneous UGV to exponentially track a predetermined trajectory. To minimize control cost, a decentralized quadratic programming is proposed such that each UGV’s optimal control input can be computed in real time and online. Compared with existing centralized method, our method is a decentralized one which significantly reduces the computational complexity because it enables each UGV to make independent decisions using only local information. The results can be easily applied to obstacle avoidance of static obstacles. Both simulations and experiments verify that the proposed method can effectively achieve the safety and trajectory tracking of the HMUGVS.