Time-of-flight secondary ion mass spectrometry (ToF-SIMS) was used to study the effects of cocaine versus methylphenidate administration on both the localization and abundance of lipids in Drosophila melanogaster brain. A J105 ToF-SIMS with a 40 keV gas cluster primary ion source enabled us to probe molecular ions of biomolecules on the fly with a spatial resolution of ∼3 μm, giving us unique insights into the effect of these drugs on molecular lipids in the nervous system. Significant changes in phospholipid composition were observed in the central brain for both. Principal components image analysis revealed that changes occurred mainly for phosphatidylcholines, phosphatidylethanolamines, and phosphatidylinositols. When the lipid changes caused by cocaine were compared with those induced by methylphenidate, it was shown that these drugs exert opposite effects on the brain lipid structure. We speculate that this might relate to the molecular mechanism of cognition and memory.