The energy management problem of hybrid unmanned aerial vehicles (UAVs) is studied in this paper, and an energy management strategy based on hierarchical model predictive control (HMPC) is proposed. The structure of HMPC is divided into the trajectory optimization layer and the control layer. The trajectory optimization layer primarily considers the factors like economic costs, including hydrogen consumption, equipment purchase, use costs, and equipment lifetime. To determine the optimal trajectory of the battery state of charge, the trajectory optimization layer is optimized and solved. The control layer is model predictive control, and its key function is to follow the reference trajectory to obtain the optimal fuel cell output power. A grey Markov prediction model is proposed and used to predict the future power demand of UAVs. The superiority of the prediction model is demonstrated by comparing it with the typical prediction methods. Based on the simulation and experimental comparison, it can be concluded that the effect of the HMPC is satisfactory and has a positive impact on the endurance of the UAV.