A series of novel S-esters of 2-(4-nitrobenzoyl)hydrazinecarbodithioic acid and S,S′-diesters of (4-nitrobenzoyl)carbonohydrazonodithioic acid were synthesized by reaction of 4-nitrobenzohydrazide and N-methyl-4-nitrobenzohydrazide with carbon disulfide and alkyl halides in the presence of triethylamine. Novel 5-(4-nitrophenyl)-1,3,4-oxadiazoles were also obtained. The structures were confirmed by IR, NMR, and mass spectroscopy, and by elemental analysis. All the compounds obtained were screened in vitro for their tuberculostatic activity. Promising preliminary results were obtained for some of the compounds. The crystal structure of the most active compound was determined.Graphical abstractElectronic supplementary materialThe online version of this article (doi:10.1007/s00706-011-0708-y) contains supplementary material, which is available to authorized users.