This paper proposes a Pontryagin's minimum principle (PMP) energy management strategy (EMS) based on driving cycle recognition for fuel cell vehicle powertrains, aiming to minimize hydrogen consumption and fuel cell degradation. Firstly, the neural network-based driving cycle recognizer is optimized using the tuna swarm optimization (TSO) algorithm and trained under four typical driving cycles. Then, the optimal co-state variables for the four driving cycles are obtained by iteration. Finally, the co-state variables are dynamically updated based on real-time driving cycle recognition results. Comparative analysis demonstrates that the PMP-DCR effectively improves fuel cell lifetime and vehicle economy under short-distance driving cycles. Based on the combined driving cycle, the proposed PMP-DCR EMS exhibits similar economy performance to optimal dynamic programming (DP) EMS, reducing equivalent hydrogen consumption by 13.8% and 9.2%, and decreasing fuel cell degradation rates by 93% and 8.7% in comparison to the conventional power-following and PMP EMS, respectively.