The magnetohydrodynamic (MHD) flow of an incompressible, viscous, electrically conducting fluid in infinite channels in the presence of a magnetic field is investigated. The fluid is driven either by a pressure gradient or by the currents produced by electrodes placed parallel in the middle of the walls. The applied magnetic field is perpendicular to the infinite walls which are combined from conducting and insulated parts. A boundary element method (BEM) solution has been obtained by using a fundamental solution which enables to threat the convection-diffusion type equations in coupled form with general wall conductivities. Constant elements are used for the discretization of the walls by keeping them as finite since the boundary integrals are restricted to these boundaries due to the regularity conditions as x,y -> +/- infinity. The solutions are presented in terms of equivelocity and induced magnetic field contours for several values of Hartmann number and conducting lengths. The effect of the parameters on the solution is visualized. (C) 2011 Elsevier Ltd. All rights reserved.