A synthetic entry to derivatives of the new classes of 5-phthalimidouracils and 5-phthalimidobarbituric acids is reported. These 5-phthalimidopyrimidines as well as phthalimido-2,4-difluorobenzenes were designed as analogues of thalidomide, a well known inhibitor of TNF-alpha production. A preliminary in vitro investigation of the compounds as inhibitors of the TNF-alpha production was performed. Among the compounds of the present series, 5-ethyl-1-phenyl-5-(tetrafluorophthalimido)barbituric acid and 2-(2,4-difluorophenyl)-4,5,6,7-tetrafluoro-1H-isoindole-1,3(2H)-dione were proved to be potent inhibitors. Both compounds showed inhibitory activity in the lower micromolar range on the LPS-induced TNF-alpha production in human monocytes.