The Star by H. G. Wells is an 1897 apocalyptic short story by H. G. Wells.
In January (about 1900, presumably), the people of Earth awaken to the news that a strange luminous object has entered the Solar System, disturbing the orbit of the planet Neptune. The object, a celestial body, is visible in the sky in the constellation of Leo.
Although initially it is only of interest to astronomers, eventually the world media announces that it is a star heading toward the center of our star system. It consumes Neptune. Many people are concerned by this, but on the whole it amounts to little more than a temporary fad.
The rogue star continues on its path, now affecting the planet Jupiter and all its moons. At this point, the studies of a mathematician are published throughout the world. He explains that the Sun's gravity is pulling the intruder deeper into the Solar System. It will either hit the Earth or make a close pass, which would lead to apocalyptic ecological consequences. As the intruder disrupts nights on Earth, many people begin to worry, but cynics cite the year 1000, in which humanity also anticipated the world's end.
The English winter softens progressively into a thaw, as the star approaches. Its high speed is evident during the worst hours of the event. On that day, in the sky above England the star is a third of the apparent size of the Moon. By the time it appears over the United States, it appears as large as the Moon.
Soon all of the ice on Earth begins to melt, causing widespread flooding. The star then begins to outshine the Sun. Massive cracks form in the planetary crust, releasing lava. Tidal waves cause worldwide devastation, particularly in the Pacific region. Most of humanity perishes, and its works are rendered unusable: cities, farms, etc. The few survivors see the Moon passing before the traveling star, creating a weak eclipse, as it leaves its orbit about the Earth to a new, more distant one. The star continues on its way and merges with the Sun.
Earth manages to survive despite the massive havoc wreaked upon its surface. Extensive areas of Greenland and other northern islands have thawed and are now green and pleasant for habitation. Humans settle in new areas close to the poles, where the climate is more temperate. Meanwhile, Martian astronomers have witnessed the event, concluding that not much has changed on the distant planet apart from the melting of ice at the poles.