An important member of the defensin family, β-defensin 2, is believed to play an important role in defense against foreign pathogens. In the present study, we constructed lentiviral vectors to express and knockdown β-defensin 2 in rat lungs. The results showed that the infection of β-defensin 2 overexpression lentivirus and β-defensin 2 shRNA effectively increased and suppressed the expression of β-defensin 2 in rat lung, respectively. The overexpression of β-defensin 2 mediated by the lentiviral vector protected lung from infection of Pseudomonas aeruginosa, but shRNA targeting β-defensin 2 aggregated the damage of lung. In addition, we also found that β-defensin 2 overexpression increased basal expression of anti-inflammatory cytokine such as IL-4, IL-10 and IL-13 and decreased levels of proinflammatory cytokines which include IL-1α, IL-1β, IL-5, IL-6, IL-8, IL-18, and TNF-α. Moreover, in the process of cytokine regulation, NF-κB pathway may be involved. Taken together, these data suggest that β-defensin 2 has protective effects against infection of Pseudomonas aeruginosa in rat and plays a role in inflammatory regulation by adjusting cytokine levels.