Purpose Thermal energy storage systems use thermal energy to elevate the temperature of a storage substance, enabling the release of energy during a discharge cycle. The storage or retrieval of energy occurs through the heating or cooling of either a liquid or a solid, without undergoing a phase change, within a sensible heat storage system. In a sensible packed bed thermal energy storage system, the structure comprises porous media that form the packed solid material, while fluid occupies the voids. Thus, a cavity, partially filled with a fluid layer and partially with a saturated porous layer, has become important in the investigation of natural convection heat transfer, carrying significant relevance within thermal energy storage systems. Motivated by these insights, the current investigation delves into the convection heat transfer driven by buoyancy and entropy generation within a partially porous cavity that is differentially heated, vertically layered and filled with a hybrid nanofluid. Design/methodology/approach The investigation encompasses two distinct scenarios. In the first instance, the porous layer is positioned next to the heated wall, while the opposite region consists of a fluid layer. In the second case, the layers switch places, with the fluid layer adjacent to the heated wall. The system of equations for fluid and porous media, along with appropriate initial and boundary conditions, is addressed using the finite difference method. The Tiwari–Das model is used in this investigation, and the viscosity and thermal conductivity are determined using correlations specific to spherical nanoparticles. Findings Comprehensive numerical simulations have been performed, considering controlling factors such as the Darcy number, nanoparticle volume fraction, Rayleigh number, bottom slit position and Hartmann number. The visual representation of the numerical findings includes streamlines, isotherms and entropy lines, as well as plots illustrating average entropy generation and the average Nusselt number. These representations aim to provide insight into the influence of these parameters across a spectrum of scenarios. Originality/value The computational outcomes indicate that with an increase in the Darcy number, the addition of 2.5% magnetite nanoparticles to the GO nanofluid results in an enhanced heat transfer rate, showing increases of 0.567% in Case 1 and 3.894% in Case 2. Compared with Case 2, Case 1 exhibits a 59.90% enhancement in heat transfer within the enclosure. Positioning the porous layer next to the partially cooled wall significantly boosts the average total entropy production, showing a substantial increase of 11.36% at an elevated Rayleigh number value. Positioning the hot slit near the bottom wall leads to a reduction in total entropy generation by 33.20% compared to its placement at the center and by 33.32% in comparison to its proximity to the top wall.