Some argue that the first genuine science fiction novel is Mary Shelley's Frankenstein, where technology bordering necromancy is used to reanimate the dead. But labeling what falls under science fiction can be troublesome. Christopher McKitterick says that in the strict etymological sense, it's literature about scientific discovery or technological change, but then argues that this definition misses the mark; instead Mckiterrick believes "SF is about how we have changed, how external change affects us, how things we do change the world around us, and how we will continue to change over time." What about works of fiction written in a time when science wasn't even considered a distinct field, separate from natural philosophy, or study of religious truth, etc? Depending on how you class what makes science fiction, Lucian of Samosata's "True Stories" might be the first science fiction novel. The characters venture to distant realms including the moon, the sun, and strange planets and islands. The star protagonist is Lucian himself who happens to stumble upon aliens on the moon and finds himself in the midst of a war between the lunar and sun empires.
Written in 2AD Roman Syria, True Stories parodies Lucian's contemporary authors who would write various books filled with superstitions and mythology, but labeled them as "true stories." Here's a summary via Wikipedia:
"In True Stories, Lucian and a company of adventuring heroes sailing westward through the Pillars of Hercules (the Strait of Gibraltar) in order to explore lands and inhabitants beyond the Ocean, are blown off course by a strong wind, and after 79 days come to an island. This island is home to a river of wine filled with fish and bears, a marker indicating that Heracles and Dionysos have traveled to this point, along with normal footprints and giant footprints.
Shortly after leaving the island, they are lifted up by a whirlwind and after seven days deposited on the Moon. There they find themselves embroiled in a full-scale war between the king of the Moon and the king of the Sun over colonisation of the Morning Star, involving armies including such exotica as stalk-and-mushroom men, acorn-dogs ("dog-faced men fighting on winged acorns"), and cloud-centaurs. Unusually, the Sun, Moon, stars and planets are portrayed as locales, each with its unique geographic details and inhabitants. The war is finally won by the Sun's armies clouding the Moon over. Details of the Moon follow; there are no women, and children grow inside the calf of men.
After returning to Earth, the adventurers become trapped in a giant whale; inside the 200-mile-long animal, there live many groups of people whom they rout in war. They also reach a sea of milk, an island of cheese and the isle of the blessed. There Lucian meets the heroes of the Trojan War, other mythical men and animals, and even Homer. They find Herodotus being eternally punished for the "lies" he published in his Histories.
After leaving the Island of the Blessed, they deliver a letter to Calypso given to them by Odysseus explaining that he wishes he had stayed with her so he could have lived eternally. They then discover a chasm in the Ocean, but eventually sail around it, discover a far-off continent and decide to explore it. The book ends rather abruptly with Lucian saying that their adventure there will be the subject of following books."
So, more fantasy than science fiction? I guess it's best we leave it to art and literature historians to settle the matters. What's certain is that this is a hilarious book, and I can't help being amazed on how imaginative Lucian was. For Lucian himself, however, I suspect the novel was quite a serious matter. No one today (I hope) still believes nymphs, minotaurs or centaurs are real, but in Lucian's day there were still many people who took these creatures and fables as literally true. True Stories, who's title is intentionally mocking, alluded to these superstitions, exaggerating accounts even by mythical standards to awake even a glimmer of skepticism in the reader's mind. Ever witty, Lucian made sure gullible readers won't fall into thinking his novel is actually a true story with the disclaimer that the accounts described are "things I have neither seen nor experienced nor heard tell of from anybody else; things, what is more, that do not in fact exist and could not ever exist at all. So my readers must not believe a word I say."
If you're curious, you can download the whole book, translated into English from Greek, here.
You can read the entire thing here.