The utilization of near-infrared (NIR) photons holds paramount importance in the realm of electricity conversion, as it offers a promising avenue to enhance the capabilities of dye-sensitized solar cells (DSSCs). In light of this, a pioneering effort was made to synthesize two novel Squaraine (SQI-5 and SQI-6) dyes that comprise two functional groups (-SO3H and -COOH) with the aim of producing efficient far-red sensitizers that could be applied in DSSCs. The efficacy of the recently developed dyes was extensively evaluated using diverse analytical techniques, which confirmed their exceptional solubility in multiple organic solvents. Investigation into the adsorption behavior of the SQI-5 and SQI-6 sensitizers on mesoporous TiO2 showed that the -COOH anchoring group demonstrated a higher rate of adsorption compared to the -SO3H group, whereas the stability of the adsorbed dyes was superior for -COOH as opposed to -SO3H following dye desorption tests. Both theoretical and experimental methods were employed to evaluate the impact of the anchoring groups on the energy levels of the HOMO- LUMO. Despite having a high binding strength, favorable energy cascade, and decreased dye loading, the SQI-5 sensitizers featuring a sulfonic acid anchoring group demonstrated poor photovoltaic performance in comparison to SQI-6, which featured -COOH anchoring group and recorded the best photovoltaic performance compared to SQI-5 sensitizer investigated. SQI-6 achieved a power conversion efficiency (PCE) of 4.21% after simulating solar irradiation, as evidenced by its short-circuit current density (Jsc), open circuit voltage (Voc), and fill factor(FF) of 14.2 mA/cm2, 0.69 V, and 0.45, respectively. This advancement represents a significant step forward for DSSCs and paves the way for a more efficient future of DSSCs in the near-infrared (NIR) region.