The thermodynamic optimisation of laminar flow in rectangular and elliptical microchannels subjected to low or high heat flux is analytically studied. Two mathematical models are developed, by incorporating the aspect ratio term, to evaluate entropy generation numbers. Two relations for calculating the conductivity and the viscosity of CuO-water nanofluids, based on experimental data from literature, are proposed. An entropy generation analysis is proposed to optimise the geometry of the microchannel and the working fluid for each heat flux condition. It has been revealed that at low heat flux, using water in microchannels with aspect ratio e = 1 is more efficient. However, at high heat flux, it is more advisable to use microchannels with the smallest possible aspect ratio containing CuO-water nanofluids with higher conductivity and higher nanoparticles concentration. For the two cases, the rectangular microchannel reaches the minimum value of total entropy generation number compared to the elliptical microchannel.