Defensins are a major family of antimicrobial peptides that serve as the innate immune defense of both vertebrates and invertebrates. Due to their antimicrobial, chemotactic, and regulatory activities, Defensins have been exploited for their therapeutic potential. Insect Defensins are cysteine-rich and contain an N-terminal loop, α-helix, and antiparallel β-sheet, forming a "cysteine-stabilized alpha beta (CSαβ)" or "loop-helix-sheet" structure. In this study, we identified the full-length open reading frame (ORF) sequences of Defensin (TmDef) and Defensin-like (TmDef-like) genes from the mealworm beetle Tenebrio molitor using in silico methods. TmDef and TmDef-like genes encode the peptides of 72 and 71 amino acid residues, respectively. TmDefensin is comprised of a Defensin domain and the TmDefensin-like is comprised of a signal peptide of 21 amino acid residues. Phylogenetic analysis revealed close similarities of TmDefensin with the Defensin of Acalolepta luxuriosa of the longhorn beetle family. The expression of TmDef mRNA was found to be greater than that of TmDef-like mRNA and was mostly expressed in the pupal and adult stages. Tissue distribution showed high expression of TmDef-like mRNA in larval hemocytes, gut, integument, and fat body, while in adults, the expression was high in gut and hemocytes. Following bacterial and fungal stimulation in vivo, TmDef was upregulated at 24 h post-infection in whole body, fat body, and hemocytes of the larvae. Even TmDef-like mRNA was upregulated in the gut and hemocytes at 12 and 9 h post-infection respectively. These results suggest that TmDef and TmDef-like genes play important roles in protecting T. molitor from microbial contact.