This investigation describes the peristaltic motion of a magnetohydrodynamic (MHD) Oldroyd-B fluid with heat and mass transfer. An incompressible Oldroyd-B fluid is considered in a channel with flexible walls. The relevant equations are developed by employing equations of continuity, momentum, energy, and concentration. Expressions of stream function, temperature, concentration field, and heat transfer coefficient are presented when the wave number is small. The obtained solutions are graphically discussed for the several interesting parameters entering into the problem. It is found that relaxation and retardation times have opposite effects on the size of the trapped bolus.