Penaeidin is an antimicrobial peptide family found in penaeid shrimp. Penaeidin3 has a broad spectrum of antimicrobial activity and is most effective against certain bacterial species. In this study, the penaeidin3-2 gene was cloned from the Chinese shrimp, Fenneropenaeus chinensis. It was then transformed into rice plants using an Agrobacterium-mediated transformation system. The transformants were verified by polymerase chain reaction (PCR) sequencing and real-time polymerase chain reaction (RT-PCR) analysis. To evaluate the application of penaeidin3-2 expressed by rice plants in the feedstock industry and aquaculture practice, the transgenic rice bran was added to fish feed. The proliferation of microbes in the feed was significantly inhibited by the transgenic rice bran. Furthermore, the mortality of tilapias challenged with Aeromonas hydrophila was also significantly reduced when they were fed with the transgenic bran expressing penaeidin3-2. Their intestinal flora changed when the fish were fed with rice bran expressing the introduced gene for a relatively long period. Fish that survived the challenge had a more intact midgut structure. These results indicate that penaeidin3-2 expressed in rice plants may possess the ability to modulate the intestinal bacterial community and protect the gut structure from damage.