Objective. To investigate the prefrontal cortex (PFC) hemodynamics during forward and as well as backward walking, with and without a cognitive task, in people with MS (pwMS) and healthy controls. Methods. The observational functional near-infrared spectroscopy (fNIRS) study comprised 18 pwMS and 17 healthy controls. Each subject completed four walking trials: Single task (ST) forward walking, dual task (DT) forward walking, ST backward walking, DT backward walking. PFC activity for all trials was recorded using functional near-infrared spectroscopy (fNIRS). The PFC was subdivided in the frontal eye field (FEF), frontopolar cortex (FPC) and the dorsolateral PFC (DLPFC). Results. The relative oxygenated hemoglobin (HbO) concentration was higher during the DT forward walking in all PFC subareas compared with the ST forward walking for both groups. The relative HbO concentration was higher during ST backward walking compared with ST forward walking in pwMS (DLPFC, FEF) and the healthy controls (FEF, FPC), specifically during the initial part of the trial. There was no distinct difference in the relative HbO concentration between ST backward walking with DT backward walking in pwMS. In contrast, the relative HbO concentration in the FEF and the FPC increased in healthy controls during DT backward walking compared with ST backward walking, specifically during the second half of the trial. Conclusions. ST backward walking and DT forward walking impact the hemodynamics at the PFC, although, the difference between pwMS and healthy adults requires further clarification. Future RCT's are encouraged to examine the impact of an intervention program based on DT forward and backward walking on PFC activity in pwMS.