Workers' performance in indoor offices can be greatly affected by the thermal condition of the environment. However, this effect can be difficult to quantify, especially when the thermal stress is a moderate increase or decrease in temperature and the work productivity cannot be directly measured. Subjects' high motivation to perform well under experimental conditions also causes difficulties in comparing their performance in different thermal environments. In order to overcome these limitations, this paper proposes a method to investigate the effect of the indoor thermal conditions on occupants' performance by studying occupants' mental workload measured by the electroencephalography (EEG) when they perform standardized cognitive tasks. An experiment integrating EEG mental workload measurement and cognitive tasks was implemented on 15 subjects. EEG data were collected while subjects were performing four cognitive tasks on computers. Based on previous studies, we propose a mental workload index calculated from the frontal theta and parietal alpha frequency band power. Within-subject comparisons were performed to investigate whether subjects' mental workload is statistically different under three different thermal environments, representing thermal sensations of slightly cool, neutral, and slightly warm. The results show that the effect of thermal environment varies across different individuals. By comparing the mental workload index among different thermal environments, we found that the slightly warm environment resulted in a relatively higher mental workload than the other two environments to achieve the same performance. The study provides promising insights into how the thermal environment influences occupants’ performance by affecting their mental workload from the neurophysiological perspective.