Male-male social interactions exert a substantial impact on the transcriptional regulation of genes associated with aggression and mating behavior in male Drosophila melanogaster. Throughout our comprehensive genetic screening of aggression-related genes, we identified that the majority of mutants for these genes are associated with rival-induced and visually-oriented mating behavior, longer-mating-duration (LMD). The majority of mutants with upregulated genes in single-housed males significantly altered LMD behavior but not copulation latency, suggesting a primary regulation of mating duration. Single-cell RNA sequencing revealed that LMD-related genes are predominantly co-expressed with male-specific genes like dsx and Cyp6a20 in specific cell populations, especially in cone cells. Functional validation confirmed the roles of these genes in mediating LMD. Expression of LMD genes like Cyp6a20, Cyp4d21, and CrzR was enriched in cone cells, with disruptions in cone cell-specific expression of CrzR and Cyp4d21 leading to disrupted LMD. We also identified a novel gene, CG10026/Macewindu, that reversed LMD when overexpressed in cone cells. These findings underscore the critical role of cone cells as a pivotal site for the expression of genes involved in the regulation of LMD behavior. This study provides valuable insights into the intricate mechanisms underlying complex sexual behaviors in Drosophila.