We report the mechanisms for reversible and repeatable spin transition in a Prussian blue analog crystal, KCo[Fe(CN)6], derived from first-principles calculations. The forward and reverse transitions are initiated by metal-to-metal charge transfer, followed by the d-electron rearrangement at the Co center. Further, these transitions are strongly correlated with bond lengths within the crystal lattice. Both aspects of this spin crossover are in quantitative agreement with experiments. Moreover, we find that the presence of H2O molecules within this Prussian blue analog crystal is not essential to trigger spin transitions in such materials.