The effects of pineapple residue (PR) on fermentation quality, chemical composition, and bacterial community of corn straw (CS) silage were evaluated. CS was ensiled with 0% control group (CON), 15% (P1), 30% (P2), and 45% (P3) PR on a fresh matter (FM) basis for 45 days. P3 had lower dry matter (DM) and crude protein (CP) contents but higher ammonia-N (NH3-N) content than the other three groups (p < 0.05). Compared with the other groups, P1 had lower a pH and higher lactic acid and acetic acid contents (p < 0.05). The lactic acid bacteria count in P1 was higher than in P2 and P3 (p < 0.05); the number of yeast in P2 was higher than in the other groups (p < 0.05). With the increasing proportion of PR addition, the relative abundance of Lactobacillus gradually increased, and the dominant genus in P3 was Acetobacter. In summary, the addition of PR can improve the quality of CS silage, and the optimum addition ratio for PR was 15% on a FM basis.