IF novelist AN Wilson’s new book had a moment of creation, it probably happened in a secondhand book shop in London. At the time, Wilson was scouting around for a new idea and had heard about an 18th-century German naturalist and artist named George Forster. “One day, I’ll find out more about him,” he thought. Three days later, in the little shop on Charing Cross Road, he found a book about Forster and his extraordinary life.

It was not what Wilson had been expecting. George Forster is a pretty obscure figure in Britain even though he travelled with Captain Cook, and information about him is hard to come by. The book Wilson stumbled on in the shop on was the journal of Forster’s father, Johann Reinhold Forster, who also travelled with Cook and was the naturalist on his second voyage. For a novelist scratching around for his next idea, it all looked like a giant finger pointing at his next subject.

Reading the journal, Wilson discovered how good it was. “Among other things, it’s a comic masterpiece without being comic because Johann Forster turns out to be much better at navigation than Captain Cook and much better at astronomy than the ship’s astronomer,” says Wilson. “So that was funny but also he does paint a very accurate picture of three years with that remarkable son of his and all these extraordinary experiences on board the ship.”

And so Wilson researched the Forsters and the result is Resolution, which follows Cook’s second voyage to the southern hemisphere. The novel starts in 1772 as Cook, the Forsters and the crew of HMS Resolution are leaving Britain and right from the start we are pitched into the desperate conditions they must endure. By the second page, one of the crew has drowned after falling overboard and as the journey progresses we’re left in no doubt about what it was like to travel on the ship. Men are flogged, die from scurvy, and are eaten by cannibals. It is tough, bleak and frightening.

But it is also wonderful. Sailing on a ship like Resolution would certainly have been grim, but the late 1700s was also when men and women started to think in new ways and ask new questions. Does God exist? Is slavery acceptable? Is monarchy the only option? Men like George Forster also began to seriously question how humans are related to animals. At one point Forster, whose job was to draw the wildlife they encountered, takes a penguin on board and delights in observing it: “From the beadiness of its eye and the semblance of a grin in its half-opened red bill, it seemed to take a satirical view of humanity.”

The other great creature to be observed in his natural habitat is Captain James Cook himself. Everyone knows where his story ends: face down on a beach in Hawaii after being attacked and killed by the locals, but the fascination of Wilson’s novel is in discovering what the great man was like and where he came from. His father was a farm labourer and the young Cook had no schooling, yet he became one of the greatest navigators that ever lived, drawing the first map of the American coast before he had even set off to discover Australia and New Zealand.

Cook’s character comes to life in one particularly vivid moment. At the height of a storm, the captain is addressing his men: “Cook, upright and unbudgeable as a mast, in his tricorn hat and his thick coat from which the rain splashed in thick drops, bellowed, some of his words lost in the tempest’s howl. ‘We are going very likely where no man has ever been – we are going to a land of ice and snow – and every man of us will come back alive. That is my duty to you – to the Royal Navy – and to God. And by God you must obey me’.”

If you didn’t obey him, the consequences were severe. “He had a very short fuse,” says Wilson. “He would seem completely calm and then something would rile him and he would become like a mad man – that’s why he died on the third voyage because having been very good at approaching different ethnicities, he got to Hawaii and they stole one of his boats and he lost his rag. He was taking one of them hostage until they gave the boat back and he behaved like such a maniac and they came out with clubs and beat him to death.”

Historians are still divided over precisely what provoked the Hawaiians to kill Cook, especially as some have suggested they worshipped him as a god. Wilson’s theory is slightly different. “They took the body away and then brought it back – they had obviously started cooking it, because it was semi roast but they had suddenly developed this realisation that Cook was a remarkable person. In the old days of colonial history, British historians used to say Hawaiians thought Cook was a god and worshipped him, which modern historians no longer believe.”

Many people also see Cook as the founder of modern colonialism, with all its negative connotations, but again Wilson has a different take. “I don’t think that’s a fair assessment because I don’t think he was going in order to subdue these people – he was going for largely geographical reasons, he wanted to draw maps. And he wasn’t trying to convert them to Christianity. He always warned his men that they must not use artillery aggressively against the peoples of the world.”

As for the cannibalism, Wilson realised that it would be controversial to include it. “Present-day Maoris don’t like the fact that their ancestors were cannibals and Cook does describe this in his own journal – when he discovered the Maori people eating a human being, he took them back to the ship and made them finish their meal in front of his ratings so they could see for themselves that it wasn’t a myth. They thought it was possible that the entire crew of their companion ship, the Adventure, had been eaten.”

In fact, the crew of Adventure had survived, although conditions for the men on both ships were extremely difficult. One of the other reasons Wilson rather reveres Cook is that the captain recognised that something had to be done about scurvy. “When he came back from his first big voyage, inevitably some of the sailors had died of scurvy and he made a resolution to never let a man die of scurvy again – so for the second voyage, he took sauerkraut and made the sailors eat it. He had a rule that he would eat whatever the sailors ate so the result was, although he lost a few men overboard and through disease, none of them died of scurvy.”

Many of the crew did still suffer from it though, including George Forster, who lost all his teeth, and Wilson doesn’t hold back from telling us what kind of toll the journey took on him. The book also follows Forster’s life after the trip, including his unhappy marriage and the publication of his memoirs, which brought him real fame. Later, he was drawn to the ideals of the French Revolution, which led to him being declared an outlaw in Germany. The French revolutionaries wanted to change the world by ideas, says Wilson, but Cook was patient enough to discover the world as it is.

Wilson has always loved the past, and there’s a sense in his historical novels that there is much about progress that he rather regrets. There is something of that in Resolution too – the joy of discovery but sadness that it is no longer really possible. Wilson says that when he was writing the book, he was thinking partly of Cook but he was also thinking of the day men landed on the moon. The sadness of the book, and history, is that we are never likely to experience anything like that again.

Resolution is published by Atlantic, £16.99