Due to the rapid growth of the global economy, energy consumption has been steadily increasing, leading to increasing issues such as energy shortages and environmental concerns. Biomass energy, a critical renewable energy source, plays a vital role in advancing low-carbon energy development and resource sustainability. In this study, experiments were conducted to study the migration of C, H, and N elements of corn straw during the microwave heating process, and the effects of residence time, heating temperature, and microwave power were also investigated. The results showed that when the temperature rose, both the proportion of C and H elements fluctuated slightly. Specifically, when the temperature rose from 75 °C to 275 °C, there was a 1.02% increase in the proportion of the C element and a 0.25% decrease in the proportion of the H element. Residence time appeared to be a significant factor influencing the changes in C, H, and N elements. For a 40 min residence time, the proportion of the C element increased from 31.77% to 35.36%, while the proportion of the H element decreased from 4.50% to 3.83%. When there was an increase in the microwave power between 160 W and 200 W, higher temperatures were reached in the samples, leading to the carbonization process of corn straw being more complete. Consequently, the proportion of the C element rose with extended residence time, whereas the proportion of the H element decreased as the residence time increased.