Gas flow and heat transfer in confined geometries at micro-and nanoscales differ considerably from those at macro-scales, mainly due to nonequilibrium effects such as velocity slip and temperature jump. Nonequilibrium effects increase with a decrease in the characteristic length-scale of the fluid flow or the gas density, leading to the failure of the standard Navier–Stokes–Fourier (NSF) equations in predicting thermal and fluid flow fields. The direct simulation Monte Carlo (DSMC) method is employed in the present work to investigate pressure-driven nitrogen flow in divergent microchannels with various divergence angles and isothermal walls. The thermal fields obtained from numerical simulations are analysed for different inlet-to-outlet pressure ratios (1.5≤Π≤2.5), tangential momentum accommodation coefficients, and Knudsen numbers (0.05≤Kn≤12.5), covering slip to free-molecular rarefaction regimes. The thermal field in the microchannel is predicted, heat-lines are visualised, and the physics of heat transfer in the microchannel is discussed. Due to the rarefaction effects, the direction of heat flow is largely opposite to that of the mass flow. However, the interplay between thermal and pressure gradients, which are affected by geometrical configurations of the microchannel and the applied boundary conditions, determines the net heat flow direction. Additionally, the occurrence of thermal separation and cold-to-hot heat transfer (also known as anti-Fourier heat transfer) in divergent microchannels is explained.