The heat generated by microprocessors has an extremely nonuniform spatial distribution with hotspots that have heat fluxes several times larger than the background flux. Hence, for an accurate design of microchannel heat sinks used for cooling of micro-electronic devices, models are required that can take such a nonuniform distribution of wall heat flux into account. In this study, analytical solutions are obtained for hydrodynamically fully developed but thermally developing mixed electro-osmotic and pressure-driven (PD) flow in a rectangular microchannel with a peripherally uniform but axially nonuniform distribution of the wall heat flux. It is assumed that the heat flux is applied over a finite length, to mimic a physically more realistic situation, and the Péclet number is small so that lateral temperature variations are negligible as compared to the axial variations of temperature. By comparing the results with those of full numerical simulations for exponential (EHF), sinusoidal (SHF), and stepwise (STHF) distributions of wall heat flux, it is demonstrated that the solutions obtained are accurate up to a Péclet number of 10. Fortunately, this value is larger than the maximum Péclet number of electro-osmotic microflows. Furthermore, it is shown that smoother distributions of wall heat flux give rise to higher heat transfer rates. The model developed in this study can pave the way for modeling of hotspots in more complicated microfluidic devices.