Anti-lipopolysaccharide factor is a kind of antimicrobial peptide (AMP) with broad-spectrum activities against bacteria, virus, and fungi in crustacean. Different isoforms of ALFs showed different activities to virus or bacteria. Therefore, discovery of more ALFs will provide new insights into drug development and disease control. Here we reported an ALF gene, EcALF1, isolated from the ridgetail prawn Exopalaemon carinicauda. Its transcripts was mainly detected in hemocytes. Silencing of EcALF1 caused a lesion of hepatopancreas and finally led to death of the prawn. In vivo bacteria detection to the hepatopancreas showed that the colonies of thiosulphate citrate bile salts (TCBS) cultured bacteria in EcALF1-silenced prawn increased dramatically. We identified the dominant bacteria cultured in TCBS and found that Vibrio alginolyticus and Vibrio parahaemolyticus were dominant bacteria which were pathogenic species to prawn. We further synthesized the functional domain, LPS binding domain (LBD) of EcALF1, and its antibacterial and antiviral activities were detected. The synthetic EcLBD1 peptide showed very strong antibacterial activity against Micrococcus luteus and V. alginolyticus. Pre-incubation of WSSV with EcLBD1 peptide reduced the pathogenicity of WSSV infection to the prawn. The present data showed the important roles of an ALF gene in modulating the in vivo bacterial proliferation in E. carinicauda and provided new insight in disease control in aquaculture.