The long-chain alkenoic acid hydrazides (1a-d) on reaction with phenylisocyanate and phenylthiocyanate gave their corresponding semicarbazides (2a-d) and thiosemicarbazides (4a-d), which on further refluxing with POCl(3) and Ac(2)O yielded corresponding 1,3,4-oxadiazoles (3a-d) and thiadiazoles (5a-d), respectively. The structure elucidation of synthesized compounds is based on the elemental analysis and spectral data (IR, (1)H NMR, (13)C NMR and MS). The synthesized oxadiazoles and thiadiazoles have been screened for antibacterial and antifungal activities. The investigation of antimicrobial screening revealed that compounds 3c, 3d, 5c, 5d and compounds 3b, 5b, showed good antibacterial and antifungal activities, respectively.