The catecholamines play a major role in the regulation of behavior. Here we investigate, in the fly Drosophila melanogaster, the role of dopamine and octopamine (the presumed arthropod homolog of norepinephrine) during the formation of appetitive and aversive olfactory memories. We find that for the formation of both types of memories, cAMP signaling is necessary and sufficient within the same subpopulation of mushroom-body intrinsic neurons. On the other hand, memory formation can be distinguished by the requirement for different catecholamines, dopamine for aversive and octopamine for appetitive conditioning. Our results suggest that in associative conditioning, different memories are formed of the same odor under different circumstances, and that they are linked to the respective motivational systems by their specific modulatory pathways.