Purpose—This study aims to perform an in-depth analysis of double-diffusive natural convection (DDNC) in an irregularly shaped porous cavity. We investigate the convective heat transfer process induced by the lower wall treated as a heat source while the side walls of the enclosure are maintained at a lower temperature and concentration, and the remaining wall is adiabatic. Various factors, such as the Rayleigh number, Darcy effects, Hartmann number, Lewis number and effects of magnetic inclination are evaluated for their influence on flow dynamics and heat distribution. Design/methodology/approach—After validating the results, the FEM (finite element method) is used to simulate the flow pattern, temperature variations, and concentration by solving the nonlinear partial differential equations with the modified Rayleigh number (104 ≤ Ra ≤ 107), Darcy number (10−4 ≤ Da ≤ 10−1), Lewis number (0.1≤Le≤10), and Hartmann number 0≤Ha≤40 as the dimensionless operating parameters. Findings—The finding shows that the patterns of convection and the shape of the isotherms within porous enclosures are notably affected by the angle of the applied magnetic field. This study enhances our understanding of how double-diffusive natural convection (DDNC) operates in these enclosures, which helps improve heating and cooling technologies in various engineering fields. Research limitations/implications—Numerical and experimental extensions of the present study make it possible to investigate differences in thermal performance as a result of various curvatures, orientations, boundary conditions, and the use of three-dimensional analysis and other working fluids. Practical implications—The geometry configurations used in this study have wide-ranging applications in engineering fields, such as in heat exchangers, crystallization, microelectronics, energy storage, mixing, food processing, and biomedical systems. Originality/value—This study shows how an inclined magnetic field affects double-diffusive natural convection (DDNC) within a porous system featuring an irregularly shaped cavity, considering various multiphysical conditions.