This research introduces anew higher-order super-compact (HOSC) finite difference scheme to study magnetohydrodynamic (MHD) natural convection within a 3D cubic cavity filled with molten lithium. The HOSC scheme, implemented for the first time in this context, provides an advanced analysis of the thermal behavior under various wall heating conditions, including uniform and non-uniform heating. The study comprehensively explores the effects of different Hartmann numbers (Ha = 25, 50, 100, 150) and Rayleigh numbers (Ra = 103, 104, 10 5 ), with a fixed Prandtl number (Pr = 0.065) for molten lithium. Three distinct heating scenarios on the left wall (x = 0 ) of the cubic cavity are investigated: uniform heating (T theta = 1 ), y-dependent nonuniform heating (T theta = sin(ty)), and combined y and z-dependent non-uniform heating (T theta = sin(ty) sin(tz)). The results show that the HOSC scheme effectively captures the impact of varying Ha and Ra on the temperature distribution and flow field, revealing that increased Ra enhances heat transfer due to stronger convection, while higher Ha reduces heat transfer by slowing fluid motion. Notably, as Ra increases from 103 to 105 at a fixed Ha = 25, the maximum Nusselt number (NuL) experiences a remarkable 654.1% rise in Case 1, while Cases 2 and 3 show more moderate increases of 18.18% and 25.17%, respectively. The scenario in which walls are uniformly heated exhibits the most significant total entropy generation. As the Ra increases from 103 to 105 with a constant Ha = 25, the Bejan number (Be) decreases by 86% in Case 1, 83% in Case 2, and 85% in Case 3. This study provides valuable insights that could help in optimizing and designing relevant engineering systems. The novelty of the work lies in the development and application of the new higher- order super-compact (HOSC) scheme, enabling a detailed analysis of the effects of various thermal boundary conditions on 3D MHD natural convection and entropy generation.