Endophytic bacteria have a complex coevolutionary relationship with their host macroalgae. Dioecious macroalgae are important producers in marine ecosystems, but there is still a lack of research on how sex influences their endophytic bacteria. In this study, the endophytic bacterial communities in male and female S. thunbergii and their reproductive tissues (receptacles) were compared using culture methods and high-throughput sequencing. The endophytic bacterial communities detected by the two methods were different. Among the 78 isolated strains, the dominant phylum, genus, and species were Bacillota, Alkalihalobacillus, and Alkalihalobacillus algicola, respectively, in the algal bodies, while in the receptacles, they were Bacillota, Vibrio, and Vibrio alginolyticus. However, 24 phyla and 349 genera of endophytic bacteria were identified by high-throughput sequencing, and the dominant phylum and genus were Pseudomonadota and Sva0996_ Marine_ Group, respectively, in both the algal body and the receptacles. The two methods showed similar compositions of endophytic bacterial communities between the samples of different sexes, but the relative abundances of dominant and specific taxa were different. The high-throughput sequencing results showed more clearly that the sex of the host alga had an effect on its endophyte community assembly and a greater effect on the endophytic bacterial community in the receptacles. Moreover, most specific bacteria and predicted functional genes that differed between the samples from the males and females were related to metabolism, suggesting that metabolic differences are the main causes of sex differences in the endophytic bacterial community. Our research is the first to show that host sex contributes to the composition of endophytic bacterial communities in dioecious marine macroalgae. The results enrich the database of endophytic bacteria of dioecious marine macroalgae and pave the way for better understanding the assembly mechanism of the endophytic bacterial community of algae.