In this study, the chemical, thermogravimetric, and elemental composition of Nigerian groundnut (Arachis hypogaea L.) and cowpea shells (Vigna unguiculata) were investigated to understand their potential as valuable waste resources. Analysis of the carbohydrates and lignin content was performed using the National Renewable Energy Laboratory method. Fourier transform infrared (FTIR) spectroscopy was used to determine the chemical structure of the substrates. Elemental analysis was performed using X-ray fluorescence (XRF) and an elemental analyzer to determine the carbon, hydrogen, nitrogen, and sulphur. In addition, thermogravimetric analysis was used to assess the thermal stability of the substrates. The chemical composition analysis revealed that the cowpea shells contain 21.32% cellulose, 21.46% hemicellulose, and 28.37% lignin. On the other hand, groundnut shells comprise 26.31% cellulose, 19.5% hemicellulose, and 38.33% lignin. The XRF results indicated the presence of significant elemental compositions in both substrates, including Si, Al, Mg, Na, P, Fe, K, Ca, and S. The carbon content of both substrates was found to be 43%. Thermogravimetric analysis revealed that groundnut shells exhibit a higher cellulose decomposition temperature at 350 °C, whereas cowpea shells manifest this phenomenon at 322 °C. The results show that the cowpea shells had a higher heating value as they exceeded that of the groundnut shell by 0.89 per cent. These comprehensive findings show the substantial potential of Nigerian groundnut and cowpea shells as valuable waste materials, which can be effectively used to produce valuable products such as bioethanol, biochemicals, biochar, and bio-composite materials. This research contributes to understanding the composition and properties of these agricultural by-products, thus paving the way for their sustainable use in various industrial applications.