A two-dimensional laminar flow of a non-Newtonian Carreau ferrofluid under the influence of a uniform inclined magnetic field is considered in a square cavity with a stationary heated cylinder. The objective is to determine the impact of nonlinear variation of the ferrofluid's viscosity with the shear rate on velocity and temperature distributions, localized and average heat transfer, and also on entropy generation. The Boussinesq approximation is assumed to be valid, making the momentum transport sensitive to thermal transport. Solutions are obtained numerically over a refined mesh with a customized OpenFOAM solver, which accounts for the coupling of Navier-Stokes equations with Maxwell equations. Controlling parameters are computed based on the physical properties of the base fluid and nanoparticles. For validation, present solutions are compared with the available published data and are found to be in good agreement with each other. Through a detailed analysis, it is concluded that the inclined magnetic field, volume fraction, and power-law index can sufficiently alter the momentum and thermal fields and, consequently, the local and mean heat transfer rates and the irreversibility generated due to fluid friction, heat transfer, and magnetic field. Particularly, the investigation reveals that the rate of heat transfer can be optimized with the help of the applied magnetic field direction, and in the present situation, the maximum heat transfer rate can be achieved when it is implemented in the vertical direction (Γ = π/2). The average Bejan number, Be avg , computed for the pure fluid and ferrofluid indicate that the irreversibility due to heat transfer is dominant compared to the fluid friction irreversibility.