Courtship behavior in Drosophila has often been described as a classic innate behavioral repertoire, but more recently extensive plasticity has been described. In particular, prior exposure to acoustic signals of con‐ or heterspecific males can change courtship traits in both sexes that are liable to be important in reproductive isolation. However, it is unknown whether male courtship song itself is socially plastic. We examined courtship song plasticity of two species in the Drosophila melanogaster subgroup. Sexual isolation between the species is influenced by two male song traits, the interpulse interval (IPI) and sinesong frequency (SSF). Neither of these showed plasticity when males had prior experience of con‐ and heterospecific social partners. However, males of both species produced longer bursts of song during courtship when they were exposed to social partners (either con‐ or heterospecific) than when they were reared in isolation. D. melanogaster carrying mutations affecting short‐ or medium‐term memory showed a similar response to the social environment, not supporting a role for learning. Our results demonstrate that the amount of song a male produces during courtship is plastic depending on the social environment, which might reflect the advantage of being able to respond to variation in intrasexual competition, but that song structure itself is relatively inflexible, perhaps due to strong selection against hybridization.