The purpose of this study was to explore the effects of different factors on the compressive mechanical properties of corn kernels. Explore the relationship between endosperm hardness and compressive mechanical properties of corn kernels by polynomial regression analysis. The results showed that the variety and kernel orientation had a significant effect on the compressive mechanical properties of corn kernels. Flint corn had a stronger ability to resist damage than floury corn. As the loading rate increased from 5 to 25 mm/min, the rupture force and rupture energy of corn kernels changed accordingly. The hardness of horny endosperm was significantly higher than that of floury endosperm. The dense starch‐protein network structure of horny endosperm leads to higher hardness. According to the fitting results, the compressive mechanical properties of corn kernels could be predicted using the hardness of the horny endosperm within a certain range.Practical applicationsAs a widely planted food crop in the world, corn is not only an important food crop, but also a high‐quality feed for livestock and poultry. The compressive mechanical properties (elastic modulus, compressive failure force, failure energy, etc.) of corn kernels were explored, and the relationship between endosperm hardness and its mechanical properties was analyzed. It can provide technical parameters for mechanical processing equipment, reduce the loss of corn grain in the processing process, and improve its economic value.