Magnetic properties of Li$_x$CoO$_2$ for $x = 0.94, 0.75, 0.66$ and $0.51$ were investigated in frames of method combining Generalized Gradient Approximation with Dynamical Mean--Field Theory (GGA+DMFT). We found that a delicate interplay between Hunds exchange energy and $t_{2g}-e_g$ crystal field splitting is responsible for the high spin to low spin state transition for Co$^{4+}$ ions. The GGA+DMFT calculations show that at small doping level the Co$^{4+}$ ions adopt high spin state, while delithiation results in increase of the crystal field splitting and low spin state becomes preferable. The Co$^{3+}$ ions were found to stays in the low spin configuration for any $x$.