Because the use of antibiotics is forbidden, piglets experience a considerable weanling stress, resulting in increased incidence of diarrhea and death. Macleaya cordata extract or benzoic acid have anti-inflammatory, antioxidant, and antimicrobial activities that makes them potential antibiotic alternatives. The objective of this study was to evaluate the potential effects of feed supplemented with Macleaya cordata extract and benzoic acid on growth performance, immunity, antioxidant capacity, intestinal morphology, and microflora in weaned piglets. Twenty-four weaned piglets [Duroc × (Large White × Landrace)] 28 days of age and weighing 8.41 ± 0.13 kg were randomly divided in equal numbers (n = 8) into three groups fed a basal diet (CON), CON + 20 mg/kg flavomycin + 50 mg/kg quinocetone (AGP), or CON + 50 mg/kg Macleaya cordata extract + 1,000 mg/kg benzoic acid (MB). Compared with the CON diet, dietary MB or AGP increased the final weight and average daily gain, and reduced feed efficiency and the diarrhea rate (P < 0.05). Compared with the CON diet, MB supplementation increased serum superoxide dismutase (SOD activity) and decreased malondialdehyde (MDA) content (P < 0.05). Serum interleukin (IL)-10 IgA and IgM were higher (P < 0.05) in MB-fed piglets than in CON-fed piglets. Piglets fed the MB diet had greater villus height and villus height to crypt depth ratio (VC) in the duodenum, villus height in the ileum, and lower crypt depth in the jejunum than did piglets given the CON diet (P < 0.5). Piglets in the MB group had increased concentrations of acetate, propionate, butyrate, and total short-chain fatty acids in the ileum or cecum compared with the CON and AGP groups (P < 0.05). Streptococcus proportion was lower in the MB than in the AGP group. Dietary MB increased the Lactobacillus and decreased Escherichia-Shigella populations compared with the CON group (P < 0.05). The study results indicate that MB can be used to replace AGP as a feed supplement for weaned piglets.