We explore the understudied role of Y chromosome genes in modulating mating behaviors and interval timing in male fruit flies. Our findings reveal a significant impact of these genes on mating duration, a critical aspect of sexual selection and reproductive success. Through the use of XO males lacking a Y chromosome and RNA interference (RNAi) techniques to knockdown specific Y chromosome genes, we demonstrate that the Y chromosome and its genes WDY and CCY are essential for the generation of Longer-Mating-Duration (LMD) and Shorter-Mating-Duration (SMD) behaviors. Notably, the neuronal knockdown of Ppr-Y, a gene highly expressed in both neuronal and glial cells, leads to profound disruptions in courtship and mating behaviors without affecting fertility. Utilizing the fly SCope scRNA-seq data platform, we identified that several Y chromosome genes, including kl-3, kl-5, WDY, and PRY, are preferentially expressed in fru-positive neurons, suggesting a role in male-specific neuronal populations. Our work not only advances the understanding of the Y chromosome's contribution to complex mating behaviors but also sets the stage for future investigations into the molecular mechanisms underlying sexual dimorphism and reproductive strategies in Drosophila.