Aversive learning and memories are crucial for animals to avoid previously encountered stressful stimuli and thereby increase their chance of survival. Neuropeptides are essential signaling molecules in the brain and are emerging as important modulators of learned behaviors, but their precise role is not well understood. Here, we show that neuropeptides of the evolutionarily conserved MyoInhibitory Peptide (MIP)-family modify salt chemotaxis behavior in Caenorhabditis elegans according to previous experience. MIP signaling, through activation of the G protein-coupled receptor SPRR-2, is required for short-term gustatory plasticity. In addition, MIP/SPRR-2 neuropeptide-receptor signaling mediates another type of aversive gustatory learning called salt avoidance learning that depends on de novo transcription, translation and the CREB transcription factor, all hallmarks of long-term memory. MIP/SPRR-2 signaling mediates salt avoidance learning in parallel with insulin signaling. These findings lay a foundation to investigate the suggested orphan MIP receptor orthologs in deuterostomians, including human GPR139 and GPR142.