An electric bicycle comprising: a hub motor including a motor housing configured to rotate with a wheel; a sprocket connected to the hub motor via a one-way clutch and connected to a chain so as to rotate by receiving rider pedaling force through the chain; a first speed detector to detect a speed of the hub motor; a second speed detector to detect a speed of the sprocket; a motor driving unit to drive the hub motor; and an electronic control unit to compare the speed of the hub motor with the speed of the sprocket and control the motor driving unit to perform speed control of the hub motor according to a comparison result, wherein the second speed detector includes: a magnet provided at the motor housing and disposed adjacent to teeth formed at an outer peripheral surface of the sprocket; a magnetic substance disposed apart from the magnet at a distance corresponding to a gap between the teeth of the sprocket or more gaps; a PCB substrate fixed to a shaft of the hub motor so as not to rotate although the motor housing rotates; characterized in that the electric bicycle comprises: - a magnetic substance assembly connected with the magnetic substance and configured to rotate with the motor housing when the motor housing rotates; and, - a hall sensor provided at the PCB substrate is disposed adjacent to the magnetic substance assembly so as to detect the rotating speed of the sprocket by detecting a change of a magnetic field of the magnetic substance assembly to which the magnetic field formed at the magnet and the magnetic substance is transmitted when the teeth of the sprocket rotate. a hub motor including a motor housing configured to rotate with a wheel; a sprocket connected to the hub motor via a one-way clutch and connected to a chain so as to rotate by receiving rider pedaling force through the chain; a first speed detector to detect a speed of the hub motor; a second speed detector to detect a speed of the sprocket; a motor driving unit to drive the hub motor; and an electronic control unit to compare the speed of the hub motor with the speed of the sprocket and control the motor driving unit to perform speed control of the hub motor according to a comparison result, wherein the second speed detector includes: a magnet provided at the motor housing and disposed adjacent to teeth formed at an outer peripheral surface of the sprocket; a magnetic substance disposed apart from the magnet at a distance corresponding to a gap between the teeth of the sprocket or more gaps; a PCB substrate fixed to a shaft of the hub motor so as not to rotate although the motor housing rotates; characterized in that the electric bicycle comprises: - a magnetic substance assembly connected with the magnetic substance and configured to rotate with the motor housing when the motor housing rotates; and, - a hall sensor provided at the PCB substrate is disposed adjacent to the magnetic substance assembly so as to detect the rotating speed of the sprocket by detecting a change of a magnetic field of the magnetic substance assembly to which the magnetic field formed at the magnet and the magnetic substance is transmitted when the teeth of the sprocket rotate. a magnet provided at the motor housing and disposed adjacent to teeth formed at an outer peripheral surface of the sprocket; a magnetic substance disposed apart from the magnet at a distance corresponding to a gap between the teeth of the sprocket or more gaps; a PCB substrate fixed to a shaft of the hub motor so as not to rotate although the motor housing rotates; characterized in that the electric bicycle comprises: - a magnetic substance assembly connected with the magnetic substance and configured to rotate with the motor housing when the motor housing rotates; and, - a hall sensor provided at the PCB substrate is disposed adjacent to the magnetic substance assembly so as to detect the rotating speed of the sprocket by detecting a change of a magnetic field of the magnetic substance assembly to which the magnetic field formed at the magnet and the magnetic substance is transmitted when the teeth of the sprocket rotate. - a magnetic substance assembly connected with the magnetic substance and configured to rotate with the motor housing when the motor housing rotates; and, - a hall sensor provided at the PCB substrate is disposed adjacent to the magnetic substance assembly so as to detect the rotating speed of the sprocket by detecting a change of a magnetic field of the magnetic substance assembly to which the magnetic field formed at the magnet and the magnetic substance is transmitted when the teeth of the sprocket rotate.