Direct numerical simulation of intense laser–solid interactions is still of great challenges, because of the many coupled atomic and plasma processes, such as ionization dynamics, collision among charged particles and collective electromagnetic fields, to name just a few. Here, we develop a new particle-in-cell (PIC) simulation code, which enables us to calculate laser–solid interactions in a more realistic way. This code is able to cover almost ‘all’ the coupled physical processes. As an application of the new code, the generation and transport of energetic electrons in front of and within the solid target when irradiated by intense laser beams are studied. For the considered case, in which laser intensity is $10^{20}~\text{W}\cdot \text{cm}^{-2}$ and pre-plasma scale length in front of the solid is $10~\unicode[STIX]{x03BC}\text{m}$, several quantitative conclusions are drawn: (i) the collisional damping (although it is very weak) can significantly affect the energetic electrons generation in front of the target, (ii) the Bremsstrahlung radiation will be enhanced by 2–3 times when the solid is dramatically heated and ionized, (iii) the ‘cut-off’ electron energy is lowered by an amount of 25% when both collision damping and Bremsstrahlung radiations are included, and (iv) the resistive electromagnetic fields due to Ohmic heating play nonignorable roles and must be taken into account in such interactions.