Black corn (Zea mays L.), native to Latin America, has been cultivated for millennia and holds significant cultural and culinary importance. While anthocyanins are well-characterized flavonoids in black corn, acylated derivatives remain insufficiently explored. Here, this study isolated a cyanidin derivative with two malonyl groups from black corncobs, identified as cyanidin-3-O-(3,6-O-dimalonyl-b-D-glucoside) (C3GdM) by mass spectrometry. The effects of C3GdM on the gut microbiota of the elderly and its immunomodulatory activity were examined in vitro. The findings revealed that C3GdM markedly improved gut microbiota composition, promoting beneficial bacteria growth such as Bifidobacterium and Lactobacillus while suppressing harmful bacteria like Escherichia/Shigella. Correspondingly, C3GdM elevated the levels of short-chain fatty acids in the feces of the elderly. Additionally, C3GdM upregulated genes associated with anti-inflammatory responses and antioxidant capacity in the elderly gut microbiota. In lipopolysaccharide (LPS)-stimulated RAW264.7 macrophages, C3GdM reduced nitric oxide, tumor necrosis factor-a and interleukin-6, along with their mRNA expression. Thus, C3GdM is a promising candidate for remodeling gut microbiota in the aging population.