Abstract The Trail-Making Test (TMT) is a neuropsychological test for evaluating executive function, and the TMT Part B reflects more complex cognitive processes including cognitive set shifting. The prefrontal cortex (PFC) is thought to be involved in these cognitive processes. The purpose of the present paper was to investigate PFC activation during performance of the TMT Part A and Part B using multichannel near-infrared spectroscopy (NIRS). Subjects were 41 healthy right-handed volunteers. The hemodynamic changes in the PFC during the TMT were measured on a 22-channel NIRS machine. The subjects had a greater increase of oxygenated hemoglobin ([oxyHb]) during the TMT Part B than during Part A in the PFC. Twenty-seven out of the 41 subjects had a bilateral increase of [oxyHb] in the PFC during Part B according to laterality index. NIRS detected activation in the PFC during the performance of the TMT Part B and this PFC activation may reflect executive functions including cognitive set shifting involved in the TMT Part B.