An electric bicycle, comprising: a motor configured to rotate a front wheel or a rear wheel; a battery to supply power to the motor; a generator, while installed in a way that pedals are connected at a frame in between the front wheel and the rear wheel, configured to convert a rotational force of the pedals into electric energy, and to supply the electric energy to the battery; and an electronic control unit, characterized in that a mounting unit to fix the electronic control unit is provided at an upper portion of the generator while being protruded toward an upper portion, wherein the electronic control unit is built in at the frame in a state of being directly fixed to the mounting unit, wherein the electronic control unit comprises a circuit board and a housing having the circuit board built in, wherein the housing is fixed to the mounting unit through a bottom panel of the housing, and the frame further comprises a front frame provided with the front wheel; a rear frame provided with the rear wheel; and a center frame formed in a shape of a hollowness while one end of the center frame is connected to in between the front frame and the rear frame and the other end of the center frame is provided at an inside thereof with the generator installed, and wherein the electronic control unit is configured in a way to be built in between both ends of the center frame, wherein an inner wall of the center frame that corresponds to a position of the mounting unit is configured in a way to be closely adhered to an outer surface of the mounting unit to prevent the mounting unit from moving, wherein the circuit board is mounted at an inner surface of a side panel of one side of the housing, and the side panel and the bottom panel are provided with the same heat discharging material. a motor configured to rotate a front wheel or a rear wheel; a battery to supply power to the motor; a generator, while installed in a way that pedals are connected at a frame in between the front wheel and the rear wheel, configured to convert a rotational force of the pedals into electric energy, and to supply the electric energy to the battery; and an electronic control unit, characterized in that a mounting unit to fix the electronic control unit is provided at an upper portion of the generator while being protruded toward an upper portion, wherein the electronic control unit is built in at the frame in a state of being directly fixed to the mounting unit, wherein the electronic control unit comprises a circuit board and a housing having the circuit board built in, wherein the housing is fixed to the mounting unit through a bottom panel of the housing, and the frame further comprises a front frame provided with the front wheel; a rear frame provided with the rear wheel; and a center frame formed in a shape of a hollowness while one end of the center frame is connected to in between the front frame and the rear frame and the other end of the center frame is provided at an inside thereof with the generator installed, and wherein the electronic control unit is configured in a way to be built in between both ends of the center frame, wherein an inner wall of the center frame that corresponds to a position of the mounting unit is configured in a way to be closely adhered to an outer surface of the mounting unit to prevent the mounting unit from moving, wherein the circuit board is mounted at an inner surface of a side panel of one side of the housing, and the side panel and the bottom panel are provided with the same heat discharging material.