The thermal and chemical evolution of X-ray clusters of galaxies is explored, pursuing the chemical evolution and gas ejection of member galaxies. We take into account the gas-ejection processes from galaxies to intracluster space by galactic winds powered by supernovae and ram-pressure stripping. The main results are as follows:\ \ 1) The metal supply from elliptical galaxie s dominates over that of spirals and there is a possibility that ram pressure stripping had occurred at the same or in an earlier epoch than galactic winds i n ellipticals. \ 2) The iron abundance of the intracluster medium (ICM) depends strongly on the initial mass function, but weakly on the star-formation rate of ellipticals, and intermediately on the wind epoch in ellipticals and the cluster richness. \ \ 3) The contribution to the ICM from galaxies is much smaller than that of primordial gas.