After the electromagnetic generator, searching for novel electric generators without strong magnetic field is highly demanded. The generator without strong magnetic field calls for a physical picture distinct from the traditional generators. As the counterpart of the static PN junction has been widely used in the integrated circuits, we develop an electric generator named dynamic PN generator with a high current density and voltage output, which converts mechanical energy into electricity by sliding two semiconductors with different Fermi level. A dynamic N-GaAs/SiO2/P-Si generator with the open-circuit voltage of 3.1 V and short-circuit density of 1.0 A/m2 have been achieved. The physical mechanism of the dynamic PN generator is proposed based on the built-in electric field bounding back diffusing carriers in dynamic PN junctions, which breaks the equilibrium between drift and diffusion current in the PN junction. Moreover, the dynamic MoS2/AlN/Si generator with the open-circuit voltage of 5.1 V and short-circuit density of 112 A/m2 (11.2 mA/cm2) have also been achieved, which can effectively output a direct-current and light up a blue light-emitting diode directly. This dynamic MoS2/AlN/Si generator can continuously work for hours without obvious degradation, demonstrating its unique mechanism and potential applications in many fields where the mechanical energy is available.