In microfluidics, two important factors responsible for the differences between the characteristics of the flow and heat transfer in microchannels and conventional channels are rarefaction and surface roughness which are studied in the present work. An incompressible gas flow in a microchannel is simulated two dimensionally using the lattice Boltzmann method. The flow is in the slip regime and surface roughness is modeled by both regular and Gaussian random distribution of rectangular modules. The effects of relative surface roughness height and Knudsen number on gaseous flow and heat transfer are studied. It was shown that as the relative roughness height increases, the Poiseuille number increases and the Nusselt number has a decreasing or increasing trend, depending on the degree of rarefaction. A comparison between the flow and heat transfer characteristics in regular and random distribution of surface roughness demonstrates that in regular roughness, circular flows are more pronounced; Poiseuille number is higher and Nusselt number is lower than that of its equivalent random roughness.