Garlic (Allium sativum L.) has been widely studied for its insecticidal properties. The primary bioactive molecule in garlic extracts include allicin, alliin, S-allylcysteine, diallyl disulfide, diallyl trisulfide, diallyl sulfide and ajoene. However, these compounds degrade under environmental conditions once extracted. This study aimed to enhance the effectiveness of garlic extracts in controlling Tenebrio molitor by optimizing microencapsulation techniques. The garlic extracts were encapsulated using the complex coacervation method, with independent variables including pH levels (3, 6 and 9), whey protein isolate (WPI) (4 %, 6 % and 8 % w/v) and pectin (0.50 %, 0.75 % and 1.00 % w/v). A Taguchi L9 (33) orthogonal array was employed to design 9 treatments, and T. molitor mortality was assessed 72 h after a 10 sec immersion of the insects in the treatments. Statistical analysis revealed that WPI had the most significant influence (24.52 %), followed by pH (18.82 %) and pectin (7.79 %). The interaction between pH and pectin had the greatest effect on the encapsulation process, accounting for 38.65 % of the influence. The optimal microencapsulation conditions were predicted by software to be pH 3, a pectin concentration of 0.75 % w/v and a WPI concentration of 4.00 % w/v, resulting in a signal-to-noise (S/N) ratio of 42.30. Experimental validation of these conditions produced an S/N ratio of 18.54, corresponding to a T. molitor mortality rate of 92 % ± 4.47 %. The resulting microcapsules had diameters ranging from 1–5 ?m. Complex coacervation is a highly promising method for microencapsulating garlic extracts and preserving their insecticidal properties.