A series potassiums 3 were prepared by substituted benzoyl hydrazide 2 and CS2 in potassium hydroxide. These compounds 3 were converted to 4-amino-5-substituted phenyl-3-ylsulfanyl-4H-1,2,4-triazols (4) by cyclization in hydrazine hydrate. Nine novel S-beta-D-glucosides (5a similar to 5i) were synthesized by glycosylation of 4 and bromo-2,3,4,6-tetra-O-acetyla-D-glucopyranoside in the presence of potassium hydroxide with acetone as solvent. The structures of all target compounds were confirmed by H-1 NMR, C-13 NMR, IR and HRMS spectrum. The results of preliminary bioassay show that most of the tested compounds displayed variable inhibitory activity against Escherichia coli, Staphylococcus aureus, Bacillus subtilis and Monilia albican. Especially, compound 5g has strong antibacterial activity with minimum inhibitory concentration values of 8, 16, 64, 2 mu g/mL against four tested strains respectively which are similar to or higher than those of the controlled drug fluconazole or triclosan. The interaction and binding free energy of the target compounds 5a similar to 5i with FabI were studied by Autodock Vina.