In this study, a novel configuration of lid-driven vented cavity system equipped with encapsulated phase change materials is studied where applications are relevant in drying, material processing, and electronic cooling. For controlling the convective heat transfer and phase transition, combined utilization of non-uniform magnetic field with ternary nanofluid is offered. Upper wall is inclined and moving with constant speed while ternary nanofluid up to a loading of 0.03 is used. Galerkin weighted residual finite element method is considered as the solution technique. A range of parameters for Reynolds number (Re, 200–1000), wall velocity (Rep, 0–1500), Hartmann number (Ha, 0–30), inclination parameter (yd, 0–0.4H), non-uniform amplitude (Af, 0–0.3), and nanoparticle loading (ϕ, 0–0.03) are considered in the analysis. When Re is increased, transition time (tf) is generally reduced for moving wall case. Reduction of tf up to 65% is obtained at the highest Re when moving wall is used at Rep=1000. For stationary wall case, the behavior of tf with Re is non-monotonic while at the highest Re, tf is reduced. The phase transition process is strongly influenced by the moving wall velocity while first increment and decrement of tf with wall velocity is observed. Thermal performance rises by around 58% and 22%, respectively by using the highest Re for stationary and moving walls. There is a significant increase in heat transfer, of around 211%, as wall velocities rise from Rep=0 (stationary) to Rep=1500. The tf for the moving wall is decreased by around 43.7% at the highest Ha. According to the stationary scenario, tf rises by around 33% until Ha=15 and falls by roughly 39.2% between Ha=15 and Ha=30. Amplitude of non-uniform magnetic field results in variation of tf between 4.5% and 19%. When imposing magnetic field at maximum strength, thermal performance is improved by 44.75% with a moving wall while it is just 5% in a stationary scenario. While raising the value of upper wall’s inclination (yd) increases the thermal performance, it also influences the phase change process. More loading of nanoparticles in base fluid results in a faster transition; the corresponding decreases in tf are 24.5% and 12.7% for stationary and moving wall setups, respectively. The increases in thermal performance for stationary and moving wall cases are 36.3% and 33.7%, respectively.