Some new bioactive sulfur compounds bearing heterocyclic nitrogen moieties such as 3-imino -2-thioxo-4,5-dihydro-thiazolidin -4-one (3), 3-imino -2-thioxo -3,4,5,6-tetrahydro-1, 3-thiazine-4, 6-(2 H)dione (4), N-substituted -pyrazol -3,5-dione (10) , 1,3 -disubstituted -2-thioxo-pyrimidin-4,6 -dione (11) and di -(3, 5-diaminopyrazolin-1-yl)thioketone (13) derived from dithioc formic acid hydrazide (1) and thiocarbohydrazide (7) were prepared via condensation of compound 1 or 7 with acyclic and cyclic oxo compounds (e.g. aldehydes and ketones) in 1:1 and 1:2 molar ratios, and addition of iso thiocyanate or treatment with active methylene compounds followed by ring closing reactions in different media (Schemes I & II). The biocidal effect of some compounds towards some bacteria and fungi was evaluated. Compound 4 was used as selective chelating agent for spectrophotometric determination of mercury (II) ions. The limit of detection (LOD) and quantification (LOQ) of the developed spectrophotometric method were found to be equal to 0.16 and 0.52 µg mL -1 mercury (II), respectively. Compound 4 was also physically immobilized onto polyurethane foam (PUFs) and was successfully used as solid sorbent in packed column for removal of mercury (II) ions from wastewater.