Using first-principles calculations within density functional theory, we investigate the electronic and magnetic properties of different 3d transition metal-Si atomic lines on silicon Σ3 (112) grain boundary, which can be formed through grain boundary segregation. We find that (i) Fe atoms occupy the substitutional sites at the grain boundary and form an Fe-Si atomic line, but the interaction between the Fe atoms is antiferromagnetic. (ii) The ferromagnetic stability increases with the atomic number of the transition metals and Co-Si atomic line is more stable in the ferromagnetic phase and shows a semimetallic behavior. We suggest that this special TM-Si atomic line formed by thermodynamically favorable transition metal segregation on Si grain boundary could be used in design of spin-dependent quantum devices.