Worldwide, 40 to 50% of women suffer from reproductive tract infections. Most of these infections are mixed infections, are recurrent and difficult to treat with antimicrobials or antifungals alone. For symptomatic relief of infections, oral antimicrobial therapy must be combined with topical therapy. The purpose of this work is to optimize and develop a polyelectrolyte complex (PEC) of chitosan/anion for the formulation of posaconazole- and probiotic-loaded vaginal hydrogel inserts with prolonged release and significant mucoadhesion. PECs were prepared using chitosan as cationic and carrageenan, pectin and polycarbophil as anionic polymers via a lyophilization technique. PEC formation was confirmed by scanning electron microscopy, Fourier transform infrared spectroscopy and differential scanning calorimetry, by observing changes in its surface, physical and thermal properties. The probiotic, Lactobacillus casei, was added to the PEC during the lyophilization process and the effect on the probiotic viability was studied. The PECs were further compressed along with posaconazole to form hydrogel inserts and optimized using a 32 full-factorial design. The hydrogel inserts were assessed for swelling behavior, drug release, in vitro mucoadhesion and in vitro antifungal activity. The chitosan–pectin hydrogel insert demonstrated excellent mucoadhesion (1.25 N), sustained drug release (88.2 ± 2.4% in 8 h) and a swelling index of 154.7%. The efficacy of hydrogel inserts was evaluated using in vitro study with a co-culture of Lactobacillus casei and Candida albicans. This study revealed an increase in Lactobacilli casei count and a significant drop in the viable count of Candida albicans (4-log reduction in 24 h), indicating the effectiveness of hydrogel inserts in alleviating the fungal infection. Overall, our study demonstrated the potential of the hydrogel insert for preventing vaginal infection and restoring normal vaginal microbiota.