The problem of entropy generation analysis and natural convection in a nanofluid square cavity with a concentric solid insert and different temperature distributions is studied numerically by the finite difference method. An isothermal heater is placed on the bottom wall while isothermal cold sources are distributed along the top and side walls of the square cavity. The remainder of these walls are kept adiabatic. Water-based nanofluids with AlO nanoparticles are chosen for the investigation. The governing dimensionless parameters of this study are the nanoparticles volume fraction (), Rayleigh number , thermal conductivity ratio () and length of the inner solid (). Comparisons with previously experimental and numerical published works verify a very good agreement with the proposed numerical method. Numerical results are presented graphically in the form of streamlines, isotherms and local entropy generation as well as the local and average Nusselt numbers. The obtained results indicate that the thermal conductivity ratio and the inner solid size are excellent control parameters for an optimization of heat transfer and Bejan number within the fully heated and partially cooled square cavity.