Condensation of 4-chloronicotinic acid (I) with 5-chloro-2-methylthiophenol (II) led to thioether (III). Treatment of (III) with thionyl chloride, followed by Friedel-Crafts cyclization of the resulting acid chloride (IV) with AlCl3 in nitrobenzene at 100 C afforded the tricyclic compound (V). Finally, heating of (V) with N-(2-dimethylaminoethyl)hydrazine (VI) furnished the title compound.