Periodontitis is an inflammatory disease that can lead to the periodontal pocket formation and tooth loss. This study was aimed to develop antimicrobials loaded hydrogels composed of cellulose nanofibers (CNF) and κ-carrageenan oligosaccharides (CO) nanoparticles for the treatment of periodontitis. Two antimicrobial agents such as surfactin and Herbmedotcin were selected as the therapeutic agents and the hydrogels were formulated based on the increasing concentration of surfactin. The proposed material has high thermal stability, controlled release, and water absorption capacity. This study was proceeded by investigating the in vitro antibacterial and anti-inflammatory properties of the hydrogels. This material has strong antibacterial activity against periodontal pathogens such as Streptococcus mutans, Porphyromonas gingivalis, Fusobacterium nucleatum, and Pseudomonas aeruginosa. Moreover, a significant increase in malondialdehyde (MDA) production and a decrease in biofilm formation and metabolic activity of the bacteria was observed in the presence of hydrogel. Besides, it reduced the reactive oxygen species (ROS) generation, transcription factor, and cytokines production in human gingival fibroblast cells (HGF) under inflammatory conditions. In conclusion, the hydrogels were successfully developed and proven to have antibacterial and anti-inflammatory properties for the treatment of periodontitis. Thus, it can be used as an excellent candidate for periodontitis treatment.