We synthesize Sn2CoS in experiment and study its topological properties in theory. By first-principles calculations, we study the band structure and surface state of Sn2CoS with L21 structure. It is found that the material has type-II nodal line in the Brillouin zone and clear drumhead-like surface state when the spin-orbit coupling is not considered. In the case of spin-orbit coupling, the nodal line will open gap, leaving the Dirac points. To check the stability of the material in nature, we synthesize Sn2CoS nanowires with L21 structure in an anodic aluminum oxide (AAO) template directly by the electrochemical deposition (ECD) method with direct current (DC). Additionally, the diameter of the typical Sn2CoS nanowires is about 70 nm, with a length of about 70 μm. The Sn2CoS nanowires are single crystals with an axis direction of [100], and the lattice constant determined by XRD and TEM is 6.0 Å. Overall, our work provides realistic material to study the nodal line and Dirac fermions.