Fungal coinfection is an emerging problem in the COVID-19 pandemic. Aspergillus and Candida species are the most prevalent pathogens. Therapeutic drug monitoring of triazole antifungals as a first-line therapy is required to increase their effectiveness and minimize toxicity. Bioanalysis of triazole antifungals requires selective extraction because of the complexity of matrices. Molecularly imprinted polymers (MIP) are potential solutions for increasing selectivity. This study aimed to synthesize a selective MIP sorbent to simultaneously determine voriconazole, itraconazole, and fluconazole concentrations through computational and laboratory studies. The host-guest interaction was used in the selection of monomer and solvent. The synthesis was optimized by precipitation and bulk methods using single and multi-template. Adsorption tests, characterizations, and application to the sample were performed to analyze the MIP performance. The optimal synthesis obtained using the precipitation method with mol ratio of template:monomer:crosslinker was 1:4:20. Adsorption equilibrium was established within 3 h and following pseudo-second-order kinetic. The MIP-P9 provided the highest adsorption capacity and followed the Freundlich isotherm. Characterization of MIP confirmed the successful synthesis and template removal of MIP. MIP was selective to triazole antifungals and had higher recovery than NIP and SPE C18. Based on these findings, MIP can be utilized for direct separation in clinical analysis.