Liu Cixin Vol. 2: The Wandering Earth

The life-bringing sun is on track to have a catastrophic helium flash within the next four hundred years, which would wipe the Earth from the universe entirely. To survive, humanity constructs massive engines on Earth that keep running nonstop, gradually taking Earth out of the Sun's orbit. Braking, escaping, and hostile living conditions wear down humanity's hope. People who believe that civilization has already been destroyed form a rebel faction, carrying out a ruthless execution of those who still believe that the Sun will undergo a helium flash.