In recent years, flow boiling heat transfer in microchannels has been extensively studied as an efficient cooling solution, with slug flow considered the optimal operating condition for microchannels. Current research on slug flow boiling primarily focuses on circular channels and isolated bubbles modeled with 2D axisymmetric geometries. This paper investigates flow boiling in three-dimensional rectangular microchannels based on conjugate heat transfer. Superheat, velocity, and bubble generation frequency affect slug flow heat transfer by influencing the internal circulation within the liquid slug, the length and thickness of the liquid film, dry patches, and bubble length. In this study, the two-phase flow with a Peclet number (Pe) ranging from 355 to 1780 is in the transition zone, where the diffusion effects between the fluids cannot be ignored. The main mechanism for enhancing heat transfer within the liquid slug is the internal recirculation flow. In comparison to the heat transfer of single-phase flow within the channel, the average Nusselt number for two-phase flow boiling exhibits a significant enhancement, increasing by as much as 85 % and not less than 62 % concomitant with the increase in superheat. Accompanying the increment in inlet velocity, there is a notable augmentation in the Nusselt number for two-phase flow boiling, escalating by as much as 63 % and at a minimum of 29 %. Consequent to the elevation in bubble generation frequency, a substantial rise is observed in the heat transfer coefficient, surging by up to 80 % and not falling below 28 %. When the length of the liquid slug equals the width of the channel, slug flow achieves the highest heat transfer coefficient. This study provides theoretical guidance for flow pattern control within microchannels.