The fruit set in the Cucurbitaceae family is a critical determinant of fruit production and development. However, limited information is available regarding the regulatory mechanisms relating to pumpkin fruit sets. To elucidate the interplay between pumpkin fruit setting and endophytic microorganisms, we conducted a comparative analysis of the endophytic microbiota and metabolite profiles in the stems of naturally pollinated and non-pollinated pumpkin using microbiome and untargeted metabolomics approaches. The results showed that both the alpha- (reduced by 18.33∼21.88 % and 16.63∼24.08 %) and beta-diversities (reduced by 12.40 % and 40.00 %) of endophytic microorganisms (bacteria and fungi) in stems of pollinated pumpkins were significantly reduced which were significantly reduced compared to those in non-pollinated pumpkins. Meanwhile, in comparison with pollinated pumpkins, the deficiency of endophytic bacterial genera that regulate endogenous hormones and metabolites, such as Pantoea, Staphylococcus, Brevundimonas, Tatumella, and Gluconobacter, and the weak metabolic pathways, viz, the relatively stable homeostasis, such as flavone and flavonol biosynthesis, alanine, aspartate, and glutamate metabolism, and phenylpropanoid biosynthesis in stems of non-pollinated pumpkin were important reasons why fruits could not bear fruits without pollination. All above results reveal that endophytic microorganisms are closely related to the growth and development of pumpkins, also, the endophytic microbial community structures in stems of pumpkins can be reshaped by man-made measures, such as pollination.