The invention discloses 2-sulfydryl-5-substituent group-1,3,4-thiadiazole (oxadiazole) derivatives with the function of preventing and controlling bacterial and fungal diseases of crops. Due to excellent physiological activity, the derivatives get more attention in the medical field, but the agricultural activity of the derivatives is still not reported at present. The research shows that the derivatives can be used for effectively inhibiting pathogens of such bacterial diseases as rice bacterial blight, rice bacterial leaf streak, tobacco bacterial wilt and tomato bacterial wilt and pathogens of such fungal diseases as wheat scab, potato late blight, apple canker, capsicum wilt, cucumber gay mold and sclerotia sclerotium. Meanwhile, when applied to prevention and control of the bacterial and fungal diseases of crops, the 2-sulfydryl-5-substituent group-1, 3, 4-thiadiazole (oxadiazole) derivatives has the advantages of simple structure, simple the preparation process, low the production cost and wide application prospect. The 2-sulfydryl-5-substituent group-1, 3, 4-thiadiazole (oxadiazole) derivatives has a general formula shown in the specification.