The change in compositional distribution of sputtered Co-21 at. % Cr films is investigated as a function of substrate temperature using thermomagnetic analysis. As the substrate temperature increases from 50 to 400°C, the compositional inhomogeneity progresses causing compositional separation through two stages: in stage I (substrate temperature = 50-200°C), there occurs a drastic compositional separation into a ferromagnetic Co-rich component (10-13 at. % Cr, 45-50 vol %) and a paramagnetic Cr-rich component (30-40 at. % Cr, 30-40 vol %) in a hcp structure; in stage II (substrate temperature =300-400°C), σ phase precipitation seems to proceed competing with homogenization while the compositionally separated state still exists. At both stages, components with a total volume fraction of 10%-25% and compositions close to that of the film average are observed to remain. The compositional separation is recognized in compositional microstructures revealed by selective chemical etching. A two-phase separation due to the effect of magnetic transition is discussed as a possible origin of this compositional separation.