In this study, the magnetohydrodynamic flow and heat transfer of electrically conducting nanofluid over an exponentially stretching porous sheet is investigated. By introducing similarity variables, the non-linear set of partial differential governing equations, are transformed into a system of ordinary nonlinear differential equations. The equations are solved semi-analytically by the Optimal Collocation Method (OCM) which is a powerful method to solve equations containing infinite boundary conditions. The accuracy of the OCM results is examined by the Richardson method. The effects of the different physical parameters such as magnetic field strength, nanofluid volume fraction, suction strength, and the heat sink/source value are discussed on the flow and heat transfer characteristics of the problem. The obtained results show that the velocity and temperature of nanofluid increase with the increase in volume fraction. Also, when suction increases, the thickness of the boundary layers decreases. As the strength of the magnetic field (Hartmann) increases, the temperature slightly increases but the flow rate of the nanofluid decreases. The skin friction coefficient and Nusselt number increase when the values of suction parameters, volume fraction, magnetic field, and the field angle increase.