The invention provides an electronic device with a voice-controlling function, which comprises a storage unit, a sound-receiving unit, an instruction-analyzing unit, a
processing unit and a logic-analyzing module, wherein the storage unit is used for storing a preset voice
signal and the corresponding relation of the preset voice
signal and a control instruction. The sound-receiving unit is used for receiving the voice
signal of a user. The instruction-analyzing unit is used for comparing and analyzing the voice signal of the user and the preset voice signal and determining the corresponding control instruction. The
processing unit is used for executing a function corresponding to the control instruction and storing the
historical control instruction. The logic-analyzing module is used for determining the control instruction with the largest probability by combining the stored
historical control instruction and the current working state of the electronic device when the voice signal of the user and the preset voice signal are analyzed to be not in unique correspondence by the instruction-analyzing unit, and the
processing unit is used for executing the corresponding function according to the control instruction. The invention also provides a voice-controlling method. Through the invention, the electronic device with the voice-controlling function is more intellectualized, so that the use of the user is facilitated.