The features of stationary random processes and the small parameter expansion approach are used in this work to examine the impact of random roughness on the electromagnetic flow in cylindrical micropipes. Utilizing the perturbation method, the analytical solution until second order velocity is achieved. The analytical expression of the roughness function ζ, which is defined as the deviation of the flow rate ratio with roughness to the case having no roughness in a smooth micropipe, is obtained by integrating the spectral density. The roughness function can be taken as the functions of the Hartmann number Ha and the dimensionless wave number λ. Two special corrugated walls of micropipes, i.e., sinusoidal and triangular corrugations, are analyzed in this work. The results reveal that the magnitude of the roughness function rises as the wave number increases for the same Ha. The magnitude of the roughness function decreases as the Ha increases for a prescribed wave number. In the case of sinusoidal corrugation, as the wave number λ increases, the Hartmann number Ha decreases, and the value of ζ increases. We consider the λ ranging from 0 to 15 and the Ha ranging from 0 to 5, with ζ ranging from −2.5 to 27.5. When the λ reaches 15, and the Ha is 0, ζ reaches the maximum value of 27.5. At this point, the impact of the roughness on the flow rate reaches its maximum. Similarly, in the case of triangular corrugation, when the λ reaches 15 and the Ha is 0, ζ reaches the maximum value of 18.7. In addition, the sinusoidal corrugation has a stronger influence on the flow rate under the same values of Ha and λ compared with triangular corrugation.