It is unclear how regulatory genes establish neural circuits that compose sex-specific behaviors. The Drosophila melanogaster male courtship song provides a powerful model to study this problem. Courting males vibrate a wing to sing bouts of pulses and hums, called pulse and sine song, respectively. We report the discovery of male-specific thoracic interneurons-the TN1A neurons-that are required specifically for sine song. The TN1A neurons can drive the activity of a sex-non-specific wing motoneuron, hg1, which is also required for sine song. The male-specific connection between the TN1A neurons and the hg1 motoneuron is regulated by the sexual differentiation gene doublesex. We find that doublesex is required in the TN1A neurons during development to increase the density of the TN1A arbors that interact with dendrites of the hg1 motoneuron. Our findings demonstrate how a sexual differentiation gene can build a sex-specific circuit motif by modulating neuronal arborization.