This paper presents a numerical study of the magnetohydrodynamics, natural convection, and thermodynamic irreversibilities in an I-shape enclosure, filled with CuO-water nanofluid and subject to a uniform magnetic field. The lateral walls of the enclosure are maintained at different but constant temperatures, while the top and bottom surfaces are adiabatic. The Brownian motion of the nanoparticles is taken into account and an extensive parametric study is conducted. This involves the variation of Rayleigh and Hartmann numbers, and the concentration of nanoparticles and also the geometrical specifications of the enclosure. Further, the behaviors of streamlines and isotherms under varying parameters are visualized. Unlike that in other configurations, the rate of heat transfer in the I-shaped enclosure appears to be highly location dependent and convection from particular surfaces dominates the heat transfer process. It is shown that interactions between the magnetic field and natural convection currents in the investigated enclosure can lead to some peculiarities in the thermal behavior of the system. The results also demonstrate that different parts of the enclosure may feature significantly different levels of heat transfer sensitivity to the applied magnetic field. Further, the analysis of entropy generation indicates that the irreversibility of the system is a strong function of the geometrical parameters and that the variations in these parameters can minimize the total generation of entropy. This study clearly shows that ignoring the exact shape of the enclosure may result in major errors in the prediction of heat transfer and second law performances of the system.