Animals discriminate nutritious food from toxic substances using their sense of taste. Since taste perception requires taste receptor cells to come into contact with water-soluble chemicals, it is a form of contact chemosensation. Concurrent with that contact, mechanosensitive cells detect the texture of food and also contribute to the regulation of feeding. Little is known, however, about the extent to which chemosensitive and mechanosensitive circuits interact. Here, we show Drosophila prefers soft food at the expense of sweetness and that this preference requires labellar mechanosensory neurons (MNs) and the mechanosensory channel Nanchung. Activation of these labellar MNs causes GABAergic inhibition of sweet-sensing gustatory receptor neurons, reducing the perceived intensity of a sweet stimulus. These findings expand our understanding of the ways different sensory modalities cooperate to shape animal behaviour.