Fuel cell and hydrogen energy technologies have been investigated by academia, industry, and government to reduce air pollution and mitigate global warming. The transition of heavy-duty trucks (HDTs) from diesel to hydrogen fuel cells (HFCs) could maintain the contribution of HDTs to freight transport at nearly zero carbon dioxide emission. This paper analyzes and discusses the opportunities and challenges of this transition and presents recommendations. The opportunities include the global need for HDTs with low emissions and a long driving range, the unique advantages of HFCs for future energy systems, the anticipated cost reduction of HFCs owing to economies of scale, and the excellent market potential of zero-emission trucks. The challenges include the high total usage cost, research and development barriers, and market share competition from other alternatives. Some recommendations are proposed: synergistic utilization of a battery and HFCs in the HDTs power system, an incremental transition pathway, and the construction of a hydrogen highway based on renewable electricity. This study attempts to provide techno-economic insights and direction for the transition of HDTs from diesel to HFCs.