In space rescue missions, the rescued personnel may experience food shortages. In order to determine rescue missions, it is essential to examine the behavioral performance and electroencephalogram (EEG) signal changes of healthy adults completing short-term memory and concentration activities while fasting for 21 days. This paper recruited 13 volunteers and had them participate in a 21-day complete fasting experiment divided into 4 experimental stages in an experimental cabin. During this time, volunteers who completed the Two-back paradigm short-term memory task had their performance and resting state EEG data collected. Power spectrum analysis was used to determine the characteristics of the different rhythmic components in the EEG signals in order to assess the volunteers’ memory and attention changes. The results showed that the task response time was significantly prolonged during prolonged fasting (P<0.05), and the change in accuracy was not significant. The reaction speed and concentration level of volunteers gradually weaken, and the impact is most significant around the 16th day; During fasting, δ activity increased, α activity decreased, (δ+θ)/(α+β), θ/α ratio increased, and changes occur during the 10th to 16th day of fasting, and return to normal during the recovery period. Based on EEG and performance data, this paper believes that after 21 days of fasting δ, α, (δ+θ)/(α+β), θ/α changes significantly in the long period of fasting. Based on the features of each rhythmic element, these markers show how volunteers’ basic cognitive function will be impacted by attentional distraction and working memory loss during fasting. The main changes occur from the 10th to the 16th day of fasting. The research results of the paper can be used as supporting data for the assessment of cognitive ability changes during long fasting, and it also provides a reference for further exploring the mechanism of fasting in future aerospace and other fields.