The present invention provides an electric bike with capability of self-charging. The electric bike is fixedly supported by supporting legs so as to be operated in a stationary point. A user steps on a petal assembly of the electric bike to drive a wheel to rotate. The electric bike further includes a power-generating device, a controller, a battery and a damper. The controller is used to receive a power source outputted by the power-generating device and convert the power source into a plurality of DC power sources to charge the battery. The damper consumes a portion of electricity generated by the power-generating device. With the above arrangement, the electric bike can be charged by itself while the user is exercising.