Beehives are populated by bacterial species with a protective role against honey bee pathogens thanks to the production of bioactive metabolites. These compounds are largely unexploited despite their high potential interest for pest management. This study evaluated the capability of bacterial species associated with honey bees to produce 2-heptanone, a volatile organic compound with anesthetic properties of the parasitic mite Varroa destructor. The production of this compound was quantified by SPME-GC-MS in a culture filtrate of nine bacterial strains isolated from the surface of honey bees, and the biosynthetic potential was evaluated in bacterial species associated with apiaries by searching for protein homologs putatively involved in its biosynthesis by using biocomputational tools. The findings pointed out that 2-heptanone was produced by Acetobacteraceae bacterium, Bacillus thuringiensis and Apilactobacillus kunkeei isolates in concentrations between 1.5 and 2.6 ng/mL and that its production was strain-specific. Putative methylketone synthase homologs were found in Bacillus, Gilliamella, Acetobacteraceae, Bartonella and Lactobacillaceae, and the protein sequence results were distributed in nine Sequence Similarity Network (SSN) clusters. These preliminary results support the hypothesis that 2-heptanone may act as a mediator of microbial relationships in hives and provide contributions to assess the role and biosynthetic potential of 2-heptanone in apiaries.