In this paper, we numerically investigate the dynamic response and explosion resistance of gradient aluminum foam sandwich tubes subjected to external blast loads. Based on 3D-Voronoi technology, we construct density-graded aluminum foam cores to systematically explore the influence of core density distribution, density gradient, and average relative density on the protective performance of these structures. Our primary objective is to identify optimal design parameters that maximize explosion mitigation capabilities while balancing energy absorption and specific energy absorption capacities. The research results show that a positive gradient core configuration exhibits superior anti-explosion performance, significantly outperforming its uniform and negatively graded counterparts, particularly when the gradient value is substantial. For the positive gradient cores, an increase in the gradient value leads to a corresponding enhancement in explosion resistance. Conversely, in negatively graded cores, a higher gradient value diminishes the anti-explosion performance. Furthermore, while augmenting the relative density of the core layer does improve the overall explosion resistance of the sandwich tube, it comes at the cost of reduced energy absorption and specific energy absorption capabilities, highlighting the need for a delicate balance among these competing factors.