13-[(N-Alkylamino)methyl]-8-oxodihydrocoptisines were synthesized to evaluate antibacterial activity againstClostridium difficileand activating x-box-binding protein 1 (XBP1) activity, biological properties both associated with ulcerative colitis. Improving structural stability and ameliorating biological activity were major concerns. Different substituents on the structural modification site were involved to explore the influence of diverse structures on the bioactivities. The target compounds exhibited the desired activities with definite structure-activity relationship. In the series of 13-[(N-n-alkylamino)methyl]-8-oxodihydrocoptisines, the length ofn-alkyl groups has a definite effect on the bioactivity, elongation of the length increasing the antibacterial activity. The synthesized compounds were determined to display strong or weak XBP1-activating activity in vitro. The preliminary results of this study warrant further medicinal chemistry studies on these synthesized compounds.