Congo red is an azo dye widely used in the textile industry; however, its wastewater poses serious environmental problems because it is toxic to aquatic organisms, potentially carcinogenic, causes turbidity, and is difficult to degrade naturally. This study aimed to synthesize cobalt-doped ZnO nanoparticles with the addition of diethanolamine (DEA) as an additive to reduce the ZnO bandgap energy and to evaluate their photocatalytic activity in degrading Congo red dye. The material was synthesized using a sol–gel method with Co doping concentrations of 5%, 10%, 15%, 20%, and 25%, and DEA additions of 1 mL, 2 mL, and 3 mL, respectively. The optical properties were characterized using UV-DRS spectroscopy in the wavelength range of 185–1100 nm, and the bandgap energy was calculated using the Kubelka–Munk equation. Photocatalytic activity tests on Congo red were carried out under visible light (sunlight) and UV irradiation, with monitoring using UV–Vis spectrophotometry at a maximum wavelength of 498 nm. The results showed that the addition of 20% Co doping reduced the ZnO bandgap energy from 3.20 eV to 1.76 eV, and the combination of 20% Co doping with 2 mL DEA produced an optimum bandgap of 1.68 eV. Photocatalytic tests indicated that ZnO/Co 20% with 2 mL DEA exhibited the highest activity, with Congo red degradation percentages of 98.63% under visible light and 98.57% under UV light within 120 minutes of irradiation. These findings demonstrate that cobalt-doped ZnO nanoparticles with DEA as an additive can enhance the photocatalytic activity of ZnO and have potential application as a photocatalyst-based solution for the treatment of textile dye wastewater.