The practical commercialization of dye-sensitized solar cells (DSSCs) requires persistent exploration of cost-effective counter electrodes (CEs). Aiming at increasing the active sites and accelerating charge transfer of a CE electrocatalyst, cobalt sulfide decorated aniline complexes are synthesized by a reflux technique and subsequently in-situ polymerized for Pt-free polyaniline-cobalt sulfide (PANi-CoS) electrocatalysts in liquid-junction DSSCs. The preliminary results suggest that an enhanced electrocatalytic activity for I3− reduction is ascribed to the fast electron-transfer ability of PANi and the high catalytic activity of CoS. The optimized DSSC device based on PANi-7 wt% CoS yields an impressive power conversion efficiency up to 8.55% under an illumination of air mass 1.5 global simulated solar light, which is much higher than 5.65% and 5.79% for the solar cells with pure PANi and pristine Pt CEs, respectively.