A differential energy based fault protection in microgrid is presented in this paper. Initially the currents at the respective buses are retrieved and processed through a novel time-frequency transform known as S-transform to generate time-frequency contours. Spectral energy content of the time-frequency contours of fault current signals are calculated and differential energy is computed to register the fault patterns in the microgrid at grid-connected and islanded mode. The proposed scheme is tested for different shunt faults (symmetrical and unsymmetrical) and High Impedance Faults (HIF) in the microgrid with radial and loop structure. The results based on extensive study indicate that the differential energy based protection scheme can reliably protect the microgrid against different fault situations.