Background Pilots must process multiple streams of information simultaneously. Mental workload is one of the main issues in man–machine interactive mode when dealing with multiple tasks. This study aimed to combine functional near-infrared spectroscopy (fNIRS) and electrocardiogram (ECG) to detect changes in mental workload during multitasking in a simulated flight. Methods Twenty-six participants performed three multitasking tasks at different mental workload levels. These mental workload levels were set by varying the number of subtasks. fNIRS and ECG signals were recorded during tasks. Participants filled in the national aeronautics and space administration task load index (NASA-TLX) scale after each task. The effects of mental workload on scores of NASA-TLX, performance of tasks, heart rate (HR), heart rate variability (HRV), and the prefrontal cortex (PFC) activation were analyzed. Results Compared to multitasking in lower mental workload conditions, participants exhibited higher scores of NASA-TLX, HR, and PFC activation when multitasking in high mental workload conditions. Their performance was worse during the high mental workload multitasking condition, as evidenced by the higher average tracking distance, smaller number of response times, and longer response time of the meter. The standard deviation of the RR intervals (SDNN) was negatively correlated with subjective mental workload in the low task load condition and PFC activation was positively correlated with HR and subjective mental workload in the medium task load condition. Conclusion HR and PFC activation can be used to detect changes in mental workload during simulated flight multitasking tasks.