This numerical study examines a three-dimensional liquid-metal magnetohydrodynamic flow in a hairpin-shaped electrically-conducting duct with a square cross-section under a uniform magnetic field applied perpendicular to the flow plane. Predicted is detailed information on fluid velocity, pressure, current, and electric potential in the magnetohydrodynamic duct flow. Higher velocities are observed in the side layers in the inflow and outflow channels, yielding M-shaped velocity profiles. More specifically, in the present study the axial velocity in the side layer near the partitioning wall is higher than that near the outer walls because of the current features therein. In the turning segment, a large velocity recirculation is observed at the entrance of the outflow channel caused by the flow separation, yielding complicated distributions of the electric potential and current therein. The pressure almost linearly decreases along the main flow direction, except for in the turning segment.