Abstract: There is provided a self-defense spray. The self-defense spray an audio terminal that transmits at least one signal to an electronic device capable of taking a photograph, and is connectable to the electronic device; a connecting portion connected to a container storing a liquid; a nozzle that sprays a liquid material from the container; and a button that simultaneously controls the nozzle so that the nozzle sprays the liquid material, and transmits a signal for taking a photograph to the electronic device through the audio terminal in response to being triggered. The invention can provide a self-defense spray which may be carried all the time, functions without a separate battery, and is effective in crime prevention by photographing a criminal, and a method of controlling an electronic device using the self-defense spray.