Microstructure and crystalline structure of SmCo5 based alloys after various heat treatments were studied using X-ray diffraction and metallographic methods. It was established that complicated microstructure of hyperstoichiometric alloys forms in nonequilibrium conditions during crystallization of the ingots and the subsequent cooling to room temperature. XRD study of the lattice parameters of SmCo5 phase in as-cast SmCo5 based alloys after different heat treatments shows evidence of the Sm enrichment of the SmCo5 phase. The behavior of the lattice parameters of SmCo5 phase in Sm-rich alloys when subjected to aging between 1220°C and 700°C can be related to the phase transformation of SmCo5 into SmCo5-x phases.