This current work studies the heat transfer performance and entropy generation of natural convection in a nanofluid-filled U-shaped cavity. The flow behavior and heat transfer performance in the cavity are governed using the continuity equation, momentum equations, energy equation and Boussinesq approximation, and are solved numerically using the finite-volume method and SIMPLE C algorithm. The simulations examine the effects of the nanoparticle volume fraction, Rayleigh number and the geometry parameters of the U-shaped cavity on the mean Nusselt number and total entropy generation. It shows that the mean Nusselt number increases and the total entropy generation reduces as the volume fraction of nanoparticles increases. In addition, the results show that the mean Nusselt number and the total entropy generation are both increased as the Rayleigh number increases. Finally, it also shows that mean Nusselt number can be increased and the total entropy generation can be reduced by extending the length of the low temperature walls or widening the width of the low temperature walls.