A device for converting music signals into electrical stimulation is revealed. The device for converting music signals into electrical stimulation includes a switching device. The switching device is disposed with an amplifier whose input end is connected to a music player while an output end of the amplifier is connected to a voltage/current converter. A stimulating electrode is at an output end of the voltage/current converter. Music signals are input through the music player, amplified by the amplifier, and converted by the voltage/current converter. Thus the stimulating electrode at the output end stimulates users' acupuncture points for treatment of insomnia. Thereby the treatment of insomnia is effective and the sleep quality is improved. The switching device is with a high practical value.