1,1,1 -Trifluoro-2,3-alkanediones 2 easily obtainable from various aldehyde dialkylhydrazones were reacted with several diamines to afford trifluoromethylquinoxalines 3 and trifluoromethylpyrazines 4 in good yields. With the use of aldehydes and aqueous ammonia instead of diamines, diketones 2 were successfully converted to the corresponding 4-trifluoromethylimidazoles 5 in satisfactory yields.