The dynamical processes of an energetic electron beam propagating through a high-density plasma have been analyzed using an electromagnetic two-dimensional hybrid simulation code. After an initially solid cylindrical electron beam breaks up into a number of small beamlets, they start to merge with each other by means of their mutual current attractive force. The results show that detailed processes which take place when a pair of beamlets merge into a single one are different for different sizes of beamlets. When the size of the beamlet is small, the merging process is accompanied by magnetic field generation and the energy of the beam electrons then decreases in time. On the other hand, when the beamlet becomes sufficiently large, the merging no longer generates an excess magnetic field, and the energy of beam electrons is kept constant. The difference comes from the magnitude of the return current induced in the surrounding background plasma.