Angiogenin 4 bearing ribonuclease activity is an endogenous antimicrobial protein expressed in small and large intestine. However, the crucial amino acid residues responsible for the antibacterial activity of Ang4 and its impact on gut microbiota remain unknown. Here, we report the contribution of critical amino acid residues in the functional regions of Ang4 to its activity against Salmonella typhimurium LT2 and the effect of Ang4 on gut microbiota in mice. We found that Ang4 binds S. typhimurium LT2 through two consecutive basic amino acid residues, K58 and K59, in the cell-binding segment and disrupts the bacterial membrane integrity at the N-terminal α-helix containing residues K7 and K30, as evidenced by the specific mutations of cationic residues of Ang4. We also found that the RNase activity of Ang4 was not involved in its bactericidal activity, as shown by the H12 mutant, which lacks RNase activity. In vivo administration of Ang4 through the mouse rectum and subsequent bacterial 16S rRNA gene sequencing analyses demonstrated that administration of Ang4 not only increased beneficial bacteria such as Lactobacillus, Akkermansia, Dubosiella, Coriobacteriaceae UCG-002, and Adlercreutzia, but also decreased certain pathogenic bacteria, including Alistipes and Enterohabdus, indicating that Ang4 regulates the shape of gut microbiota composition. We conclude that Ang4 kills bacteria by disrupting bacterial membrane integrity through critical basic amino acid residues with different functionalities rather than overall electrostatic interactions and potentially maintains gut microflora in vivo under physiological and pathophysiological conditions.