Let's consider the effect of doping on the Fermi level for both n-type and p-type semiconductors.
In an intrinsic semiconductor, the Fermi level ($E_F$) is located near the middle of the band gap between the valence band ($E_V$) and the conduction band ($E_C$).
For an n-type semiconductor, donor impurities are added. These donors create energy levels just below the conduction band. Increasing the doping level increases the concentration of donor atoms and thus the concentration of free electrons in the conduction band. This higher electron concentration shifts the Fermi level upwards, closer to the conduction band.
For a p-type semiconductor, acceptor impurities are added. These acceptors create energy levels just above the valence band. Increasing the doping level increases the concentration of acceptor atoms and thus the concentration of holes in the valence band. This higher hole concentration shifts the Fermi level downwards, closer to the valence band.
Therefore, when the doping level is increased, the Fermi-level of a p-type semiconductor will go downward, and the Fermi-level of an n-type semiconductor will go upward.