The invention discloses a light emitting diode and a manufacturing method thereof, and belongs to the technical field of a semiconductor. An electron baffle layer of the light emitting diode comprises three sub-layers, wherein the three sub-layers comprise a first sub-layer, a second sub-layer and a third sub-layer which are sequentially grown, the first sub-layer comprises an AlGaN/InGaN superlattice layer with (n+1) periods, the second sub-layer comprises an AlGaN/InGaN superlattice layer with n periods, the third sub-layer comprises an AlGaN/InGaN superlattice layer with (n-1) periods, InGaN layers in the first sub-layer, the second sub-layer and the third sub-layer are all doped with Mg, and n is more than or equal to 3 but less than or equal to 6. The electron baffle layers are divided into three superlattice sub-layers with different doping and same structure to form three segments of baffle layers, so that non-radiative recombination due to electrons leaked to a P layer is reduced as much as possible; and moreover, the periods of the superlattices of each sub-layer in the three sub-layers are gradually reduced according to 1, the electrons can be blocked better, meanwhile, not many holes can be blocked, and the luminous efficiency of a light emitting diode crystal is further improved.