The invention belongs to the technical field of molecular biology, in particular relates to a Portunus trituberculatus anti-lipopolysaccharide factor PtALF-3 gene and encoding proteins and application thereof. In the invention, a PtALF-3 gene cDNA is amplified from a Portunus trituberculatus by utilizing a cDNA (Complementary Deoxyribonucleic Acid) library and an RACE (Rapid-amplification of cDNA Ends) technology and plays an important role in immune defense of the Portunus trituberculatus. A recombinant PtALF-3 protein has obvious antibacterial activity to Gram-negative Vibrio alginolyticus, P. Aeruginosa, Edwardsiella tarda, Gram-positive Staphylococcus aureus, Micrococcus luteus and fungus Pichia pastoris, and the minimal inhibitory concentrations are respectively 0.58 mu M, 0.58 mu M, 9.26 mu M, 74.08 mu M, 18.52 mu M and 9.26 mu M. The invention lays a foundation for disease prevention and control, gene-assisted selection and development of feed additives of the Portunus trituberculatus.