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 leftwall is at a high temperature while the topwall is cold. The remainingwalls are insulated. The results indicate thatwhen the hotwall 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 N2 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.