Endophytic bacteria play a crucial role in the life cycle of Spermatophyta, and exploring the beneficial interactions between seeds and endophytic bacteria is an effective strategy for sustainable agricultural development and improved crop productivity. In this study, we employed Illumina Hiseq high-throughput sequencing technology to analyze the amplified fragments of microbial 16S rRNA sequences from melon seeds of MR-1, HH and their F1 generation, which displayed varying levels of resistance to bacterial fruit blotch disease. Initially, we extracted endophytes from eight melon samples and performed sequencing, obtaining an average of 84,758 effective tags per sample. At the 97% similarity level, the number of operational taxonomic units (OTUs) derived from melon seed endophytes ranged from 447 to 492. After filtering out low-level OTUs, we obtained an average of 65,866 valid tags from the eight samples, representing approximately 160 genera and 167 species across eight phyla. It was found that the composition of the endophyte communities in the eight samples was basically similar, and their abundance showed some variability. Furthermore, we utilized the KO and COG databases to functionally predict the genes of endophytes in melon seeds. The analysis revealed a significant enrichment of genes associated with pathways related to protein synthesis, carbohydrate metabolism, substance transport, and metabolite synthesis. These findings greatly contribute to our understanding of endophytic bacteria in melon seeds and serve as a vital reference for the selection and breeding of high-quality melon seeds, as well as the prevention of seed diseases.