Photothermal therapy (PTT) is a novel therapy for cancer treatment which is based on the conversion of photon energy into heat (>43 °C), and photoacoustic imaging (PAI) is a new bioimaging method for diagnosing and monitoring cancer. To enhance the impact depth of PTT and the signal of PAI, near-infrared (NIR)-absorbing photothermal agents are usually used. The development of novel NIR-absorbing photothermal agents with excellent properties, such as a high stability under long-term irradiation, strong absorption in the NIR range, and excellent biocompatibility, is needed in modern biomedicine. Previous research has proved that gold nanostars (AuNSs) have promising potential applications in photo-based therapies owing to their strong absorption in the NIR range and strong photothermal effects. However, the reported methods to synthesize AuNSs are complicated and toxic, which can limit its practical application. In this work, we proposed a new environmental strategy to synthesize AuNSs by using chitosan and vitamin C. Chitosan plays multiple roles, acting as stabilizing, shape-directing, and size-controllable agents in this method for the first time. The obtained AuNSs show strong NIR absorption and biocompatibility toward non-cancerous and cancerous cell lines. The in vitro tests proved the high efficiency of the obtained AuNSs in both PTT and PAI.