Metallic ligaments in open-cell metal foams have effectively improved the heat conduction of phase change materials (PCMs). However, when the gradient direction of porosity is perpendicular to the direction of heat conduction, the mechanism by which graded foam (GF) influences the phase transition of PCM remains elusive. To address this issue, this study employs the pore-scale numerical simulation and develops a numerical model to study the impact of GF on the charging of PCM-foam composites. The analysis identifies the local convection and heat conduction as the most crucial factors influencing heat transfer during phase transition. To effectively examine the role of metallic ligaments in the phase transition, simplified tetrakaidecahedron cells are adopted. The results demonstrate that the GF delays the charging of PCM. Specifically, compared to the homogeneous foam, the full melting time (FMT) of PCM in the GF increases by over 29%. Additionally, the integral-mean temperature response rate (ITRR) of PCM in the GF decreases by 20.2% to 22.1%. Within the GF, the PCM requires more time to melt completely in the tetrakaidecahedron cells with high porosity. Moreover, local convection plays a pivotal role, considerably reducing the FMTs of PCMs by over 85% and increasing the ITRRs of these structures by 588.1% to 599.0%.