The insect central complex and vertebrate basal ganglia are forebrain centres involved in selection and maintenance of behavioural actions. However, little is known about the formation of the underlying circuits, or how they integrate sensory information for motor actions. Here, we show that paired embryonic neuroblasts generate central complex ring neurons that mediate sensory-motor transformation and action selection in Drosophila. Lineage analysis resolves four ring neuron subtypes, R1-R4, that form GABAergic inhibition circuitry among inhibitory sister cells. Genetic manipulations, together with functional imaging, demonstrate subtype-specific R neurons mediate the selection and maintenance of behavioural activity. A computational model substantiates genetic and behavioural observations suggesting that R neuron circuitry functions as salience detector using competitive inhibition to amplify, maintain or switch between activity states. The resultant gating mechanism translates facilitation, inhibition and disinhibition of behavioural activity as R neuron functions into selection of motor actions and their organisation into action sequences.