In the scheme of fast ignition of inertial confinement fusion, the fuel temperature mainly relies on fast electrons, which act as an energy carrier, transferring the laser energy to the fuel. Both conversion efficiency from the laser to the fast electron and the energy spectrum of the fast electron are essentially important to achieve highly effective heating. In this study, a two-dimensional particle in cell simulation is applied to study the generation of fast electrons from solid-density plasmas with different laser waveforms. The results have shown that the slope of the rising edge has a significant effect on fast electron generation and energy absorption. For the negative skew pulse with a relatively slow rising edge, the J × B mechanism can most effectively accelerate the electrons. The overall absorption efficiency of the laser energy is optimized, and the fast electron yield in the middle-and low-energy range is also improved.