The genomic characterization of the foraging gene and its expression analysis are required to better understand the behavior of honey bees (Apis mellifera). The present study performed a genome-wide characterization of the foraging gene, analyzing its physicochemical properties, phylogenetic features, and expression. An in silico analysis was carried out to characterize the foraging gene and the motifs and conserved domains of the encoded protein to predict its physicochemical properties. Moreover, a phylogenetic analysis of the foraging gene was performed in different species using MEGAX. The relative expression of the foraging gene was determined using qRT-PCR in two groups of forager bee samples (incoming and outgoing bees) during two seasons (five times per day). In addition, the queen effect was evaluated in another experiment. The results revealed that foraging gene expression and bee traffic were influenced by the interaction of season and daytime. The daily foraging traffic and transcription level of the foraging gene were the same in both seasons. The traffic of bees and the transcription abundance of the foraging gene were the highest in the middle and at the end of the day in the first and second seasons, respectively. Furthermore, the mRNA expression of the foraging gene was relatively higher in incoming bees than in outgoing bees. The queen also had a significant effect on the outgoing bees. We conclude that gene–environment interactions affect the foraging behavior of bees through the modulation of the foraging gene transcription.