When we add Group-1 and Group-2 metals to liquid ammonia, they dissolve to form metal cations and solvated electrons.
$$\ce{M + NH3(liq) -> M+ + e-}$$
Now, when the G-1 solutions evaporate, we get the metal back, but in the case of G-2 solutions (except Beryllium), they give a metal complex, $\ce{[M(NH3)6]}$.
"Evaporation of the ammonia from solutions of Group 1 metals yields the metal, but with Group 2 metals evaporation of ammonia gives hexammoniates $\ce{[M(NH3)6]}$ of the metals. These slowly decompose to give amides."
Page No. 335, Chapter 11-'Group 2 - the alkaline earth elements', Concise Inorganic Chemistry
and,
"The alkaline earth metals except beryllium form similar solutions [to alkali metals] readily, but upon evaporation, a solid 'ammoniate', $\ce{[M(NH3)x]}$ is formed."
What is the reason for this contrasting behaviour, and do all Group 2 metals(except beryllium) exhibit such a property?
Source:
1. Lee, J.D.; Concise Inorganic Chemistry; Wiley-Blackwell; Dec. 1998
2. Huheey, James E., Keiter, Ellen A., Keiter, Richard L.; Inorganic Chemistry: Principles of Structure and Reactivity, 4th Edition; Pearson Education Inc.; 1993