From thermodynamics we have [itex]dU=Tds-Pdv+\mu dN[/itex]. So the chemical potential is the energy change due to adding an extra particle when S and V are constant. Now consider an intrinsic semiconductor at T=0 in which the valence band is all-occupied and conduction band is empty. If we add an extra electron to the lowest point of conduction band (an specified point in the conduction band) the energy change would be [itex]E_c[/itex] and so the Fermi energy (chemical potential). Then, why the Fermi energy is in the middle of band gap and is not [itex]E_c[/itex]?