麻醉品 covers narcotics in the legal/medical sense (opium, morphine etc.) and extends figuratively to anything that dulls the mind — Marx's famous "
宗教是人民的麻醉品" (religion is the opiate of the masses) uses exactly this word. For surgical anesthesia, use
麻醉剂 mázuìjì.