As more and more people stay inside the building for a long time, the indoor environment has a great effect on their health, mood, and work efficiency. Electroencephalography (EEG) signals reflect electrical activity originating from neuronal firing when a task or activity is performed. Since there was no study on the effect of indoor air on nerves, this study utilized EEG to preliminarily explore the brain functions of subjects during working memory tasks with different difficulties. The subjects were divided into two groups according to the volatile organic compounds (VOCs) as odor irritants in the air. We expected to find the difference in subjects’ EEG signals between VOCs and low‐VOCs. The EEG signals from 60 electrodes were analyzed by event‐related potential (ERP), event‐related spectral power (ERSP), and correlation network methods to describe the brain activity. We compared the results of subjects in VOCs and low‐VOCs and found significant differences between ERP and ERSP in the alpha band during a simple working memory task. Subjects were more sensitive to the VOCs in simple tasks than in complex tasks. Our work provided evidence of odor effects on brain functions and could be used to guide the design of indoor odor in home, offices, and classrooms.