Two series of diarylmethylamine derivatives were synthesized by 1,6-addition reaction between para-quinone methides and 1-methylpiperazine or 2-oxazolidinone, and their structures were identified by 1H NMR,13C NMR and HRMS. In the lipopolysaccharide-induced inflammatory Raw264.7 cells model, 3-CF3 modified active derivative 1l was screened out by inhibiting the excessive production of NO (IC50 = 5.82 μM), and can inhibit the excessive production of ROS. Western blot analyses indicated that 1l can also inhibit the excessive production of pro-inflammatory cytokines (IL-6 and TNF-α) and the nuclear transfer of NF-κB in inflammatory cells. In the dextran sulfate sodium (DSS)-induced ulcerative colitis (UC) mice model, 1l can effectively inhibit the colonic shortening and suppress inflammatory symptoms of the colonic tissue (HE). Western blot analyses and biochemical indicators demonstrated that 1l can protect the colon of UC mice by regulating the inflammation-related TLR4/NF-κB signaling pathway and the oxidative stress-related Nrf2/HO-1 signaling pathway. Besides, the safety evaluation results of the UC mouse model (serum biochemical indicators, pathological tissue analysis and organ indexes) and the oral acute toxicity test revealed that 1l had certain safety in mice and can resist other tissues damage caused by DSS. In summary, 1l is an effective anti-inflammatory agent that can be developed as a potential drug for treating UC.