Colloidal gas aphrons (CGA) drilling fluid has been worldwide used in drilling depleted reservoirs and other under-pressured zones for its special plugging mechanism and excellent ability of lost circulation control. However, the research temperature of CGA system reported in the previous literatures is within 140 °C, and it is still an urgent challenge to promote its application in high-temperature (≥150 °C) deep wells. In this study, a novel environmentally-friendly xanthan gum derivatives XG-AA/AM/AMPS was synthesized by grafting acrylic acid (AA), acrylamide (AM), 2-acrylamido-2-methylpropane sulfonic acid (AMPS) onto XG and CGA drilling fluids with a temperature resistance of 180 °C has been successfully generated by using XG-AA/AM/AMPS as a foam stabilizer. Results presented that the XG-AA/AM/AMPS-based CGA drilling fluids can maintain reasonable rheology properties within 180 °C, i.e., significant shear thinning behavior, higher low shear rate viscosity, and apparent viscosity, and reasonable rheological parameters, which was conducive to cuttings carrying. At 140–180 °C, the filtration volume of prepared CGA fluid can be controlled within 13.5 mL. Furthermore, the high-temperature resistance mechanism of XG-AA/AM/AMPS was studied by several techniques (PSD, XRD, SEM, and polarizing microscope), which can be attributed to the dual effects of XG-AA/AM/AMPS on enhancing the dispersion of clay particles and the stability of aphrons. • A novel high-temperature resistant stabilizer XG-AA/AM/AMPS was synthesized by grafting xanthan gum with AA, AM and AMPS. • CGA drilling fluid with a temperature resistance of 180 °C was successfully prepared. • The high temperature performance of XG-AA/AM/AMPS-based CGA drilling fluid totally meets the API standard. • The high temperature resistance mechanism of XG-AA/AM/AMPS was comprehensively discussed.