Microbial infections represent a significant health risk, often leading to severe complications and, in some cases, even fatalities. As a result, there is an urgent need to explore innovative drug delivery systems and alternative therapeutic techniques. The photothermal therapy has emerged as a promising antibacterial approach and is the focus of this study. Herein, we report the successful synthesis of two distinct supramolecular composite hydrogels by incorporating graphene oxide (GO) and single-walled carbon nanotubes (SWNTs) into guanosine quadruplex (G4) based hydrogels containing covalently bound β-cyclodextrin (β-CD). The G4 matrix was synthesized through a two-step process, establishing a robust network between G4 and β-CDs, followed by the encapsulation of either GO or SWNTs. Comprehensive characterization of these composite hydrogels were conducted using analytical techniques, including circular dichroism, Raman spectroscopy, rheological investigations, X-ray diffraction, and scanning electron microscopy. A notable discovery from the conducted research is the differential photothermal responses exhibited by the hydrogels when exposed to near-infrared laser irradiation. Specifically, SWNT-based hydrogels demonstrated superior photothermal performance, achieving a remarkable temperature increase of up to 52 °C, in contrast to GO-based hydrogels, which reached a maximum of 34 °C. These composite hydrogels showed good cytotoxicity evaluation results and displayed synergistic antibacterial activity against Staphylococcus aureus, positioning them as promising candidates for antibacterial photothermic platforms, particularly in the context of wound treatment. This study offers a valuable contribution to the development of advanced and combined therapeutic strategies for combating microbial infections and highlights the potential of carbon nanomaterial-enhanced supramolecular hydrogels in photothermal therapy applications.