The present work demonstrates entropy generation due to laminar mixed convection of water-based nanofluid past a square cylinder in vertically upward flow. Streamline upwind Petrov–Galerkin (SUPG) based finite element method is used for numerical simulation. Nanosized copper (Cu) and alumina (Al_{2}O_{3}) particles suspended in water are used with Prandtl number (Pr) = 6.2. The range of nanoparticle volume fractions considered is 0–20%. Computations are carried out at a representative Reynolds number (Re) of 100 with Richardson number (Ri) range −0.5 < Ri < 0.5, both values inclusive. For both the nanofluids (Al_{2}O_{3}–water and Cu–water nanofluids), total entropy generation decreases with increasing nanoparticle volume fractions. It is found that for the present case of mixed convection flows with nanofluids, thermal irreversibility is much higher than that of frictional irreversibility. The Bejan number decreases with increasing nanoparticle volume fractions.