Misrecognition and toxic elements are two of several reasons responsible for food poisoning even death in the summer, a time when a great deal of edible mushrooms is celebrated in Southwestern China featured as complex environment conditions. It is highly important to identify the difference of chemical constituents in edible mushrooms at the regional‐scale. In this study, Fourier transform infrared (FT‐IR) spectroscopy and inductively coupled plasma mass spectrometry were applied to investigate organic matters and 18 mineral elements in porcini mushrooms of six species collected from 17 sampling sites in nine Yunnan cities. Classification models on the species, regions, and part levels were established using sparse partial least square‐discriminant analysis and principal component analysis. At the species level and region level accuracies of greater than 92.1% and 92.8% was achieved, respectively, whereas on the part level caps and stipes were classified with 96.7% accuracy. One of the most popular mushrooms is Boletus edulis characterized by polysaccharide, lipid, and ribonucleic acid as well as several phenolic compounds. Temperature and precipitation show possible influences on accumulations of polysaccharides and ribonucleic acid. Furthermore, the most important elements of caps contributed the difference between two parts are copper (Cu), zinc (Zn), and phosphorus (P), whereas stipes instead by manganese (Mn) and cobalt (Co). These results demonstrated that FT‐IR spectroscopy and elements contents provide information sufficient for classifying different porcini mushroom samples, which might be helpful for controlling food security and quality assessment of edible mushrooms.