The present in vitro experiments demonstrate inhibitory effects of polysubstituted 2-aminopyrimidines on high output production of nitric oxide (NO) and prostaglandin E2 (PGE2) stimulated by interferon-γ and lipopolysaccharide (LPS) in peritoneal macrophages of mouse and rat origin. PGE2 production was inhibited also in LPS-activated human peripheral blood mononuclear cells. A tight dependence of the suppressive activities on chemical structure of pyrimidines was observed. Derivatives containing hydroxyl groups at the C-4 and C-6 positions of pyrimidine ring were devoid of any influence on NO and PGE2. Remarkable inhibitory potential was acquired by the replacement of hydroxyl groups with chlorine, the 4,6-dichloro derivatives being more effective than the monochloro analogues. The effects were further intensified by modification of the amino group at the C-2 position, changing it to the (N,N-dimethylamino)methyleneamino or the formamido ones. There was no substantial difference in the expression of NO-inhibitory effects among derivatives containing distinct types of substituents at the C-5 position (hydrogen, methyl, ethyl, propyl, butyl, phenyl, and benzyl). In contrast to NO, larger substituents then methyl were required to inhibit PGE2 production. Overall, no significant correlation between the extent of NO and PGE2 suppression was observed. The IC50s of derivatives with the strongest effects on both NO and PGE2 were within the range of 2–10 μM. Their NO-inhibitory potential of pyrimidines was stronger than that of non-steroidal anti-inflammatory drugs (NSAIDs) aspirin and indomethacin. The PGE2-inhibitory effectiveness of pyrimidines was about the same as that of aspirin, but weaker as compared to indomethacin. The NO- and PGE2-inhibitory activity of tested pyrimidines has been found associated with decreased expression of iNOS mRNA and COX-2 mRNA, respectively, and with post-translation interactions. Selected NO-/PGE2-inhibitory derivatives decreased severity of intestinal inflammation in murine model of ulcerative colitis.