The Ce17Fe78-xB6Gax (x=0-1.0) ribbons were fabricated by a melt-spinning technique in order to study the mechanism of the valence variation of Ce and their magnetic properties as well as improve the thermal stability of Ce-based rare earth permanent magnets. The systematic investigations of the Ce17Fe78-xB6Gax (x=0-1.0) alloys show that the room-temperature coercivity increases significantly from 352 kA/m at x = 0 to 492 kA/m at x = 1.0. The Curie temperature (Tc) increases monotonically from 424.5 K to 433.6 K, and the temperature coefficients of remanence (α) and coercivity (β) of the ribbons are better off from -0.56 %/K, -0.75 %/K for x = 0 to -0.45 %/K, -0.65 %/K for x = 0.75 in the temperature range of 300–400 K, respectively. The Ce L3-edge X-ray absorption near edge structure (XANES) spectrums reveal that there is more Ce4+ in ribbons under total electron yield than fluorescence yield as Ce has a high affinity with oxygen. The weight of Ce3+ increases while the weight of Ce4+ decreases in Ga-added alloys. The refined grain size and a more uniform microstructure are mainly attributed to the improved magnetic properties and thermal stability with Ga doping. This paper may serve as a reference for further developing the so-called gap magnets and the effective utilization of the rare earth resources.