New 1,3,4-thiadiazole, 6, 7 and 1,2,4-triazole derivatives, 8, 9 containing a phenylalanine moiety have been synthesized by intramolecular cyclization of 1,4-disubstituted thiosemicarbazides, 4, 5, in acid and alkaline media, respectively; the thiosemicarbazides were obtained by reaction of hydrazide 3 with appropriate aromatic isothiocyanates. The toxicity of the synthesized compounds was evaluated and the anti-inflammatory study of the triazole compound 9 established an appreciable anti-inflammatory activity that is comparable with that of other nonsteroidal anti-inflammatory agents.