In this article, the natural convection process in a two-dimensional cold square enclosure is numerically investigated in the presence of two inline square heat sources. Two different heat source boundary conditions are analyzed, namely, case 1 (when one heat source is hot) and case 2 (when two heat sources are hot), using the in-house developed flexible forcing immersed boundary–thermal lattice Boltzmann model. The isotherms, streamlines, local, and surface-averaged Nusselt number distributions are analyzed at ten different vertical eccentric locations of the heat sources for Rayleigh number between 10^{3} and 10^{6}. Distinct flow regimes including primary, secondary, tertiary, quaternary, and Rayleigh–Benard cells are observed when the mode of heat transfer is changed from conduction to convection and heat sources eccentricity is varied. For Rayleigh number up to 10^{4}, the heat transfer from the enclosure is symmetric for the upward and downward eccentricity of the heat sources. At Rayleigh number greater than 10^{4}, the heat transfer from the enclosure is better for downward eccentricity cases that attain a maximum when the heat sources are near the bottom enclosure wall. Moreover, the heat transfer rate from the enclosure in case 2 is nearly twice that of case 1 at all Rayleigh numbers and eccentric locations. The correlations for heat transfer are developed by relating Nusselt number, Rayleigh number, and eccentricity of the heat sources.