2019 Elsevier B.V. Natural convection and entropy generation of a power-law non-Newtonian fluid in a tilted triangular enclosure subjected to a magnetic field was investigated. A part of the enclosure's right or left wall is at a high temperature while the top wall is cold. The remaining walls are insulated. The results indicate that when the hot wall is at the left wall and the Rayleigh number is increased from 103 to 105, the heat transfer rate of the shear-thinning fluid goes up 1.5 times and its entropy generation rate rises >2 fold. For the Newtonian fluid, these changes mean an increase of 71% in heat transfer and a surge of 80% in entropy generation. With the increase of Rayleigh number, Bejan number diminishes. A higher Hartmann number results in a lower average Nusselt number and entropy generation rate and the rise in the Bejan number in the considered enclosure.