GK Chesterton once revealed that Robert Louis Stevenson had an enduring affection for his childish verse ‘My Bed Is Like a Boat’. It is a nimble little rhyme and a neat image; it spoke peculiarly to Stevenson, whose voyaging mind was so often confined to the bedroom because of his poor state of health. As Joseph Farrell explains in his sparkling account of the last years of Stevenson’s life, which he spent in Samoa, these were the two sides of his character: the adventurer and the invalid.

Stevenson was always on the move. Before travelling to the Pacific, he tried to satisfy his body and spirit in Davos, New York, San Francisco and Bournemouth. In December 1889, the Reverend W E Clarke of the London Missionary Society noticed an unfamiliar outline by the beach at Apia in Samoa. Stevenson was by this time ‘so slender’, according to one person who encountered him, ‘that he looked taller than he really was; he was barefooted and walked with a long and curiously marked step, light but always metrical, in accord, it seemed, with some movement in mind’. Greeting the man and falling into conversation, Clarke mentioned ‘how much he had admired a book entitled Jekyll and Hyde’. Had the man read the novel? ‘Not only have I read it, I wrote it and before that I dreamt it,’ replied Stevenson.

Clarke’s introduction to Stevenson – one perhaps too perfect to be entirely true – came at the start of the novelist’s time on the Samoan island Upolu. The story provides the opening scene for the final act in Stevenson’s life. He eventually made his home at Vailima, near Apia, where he wrote with astonishing industry, producing novels, ballads, verse and works of history, while pursuing a vigorous correspondence with friends at home. One estimate puts the number of words he wrote during his five years in Samoa at 700,000. And here too, in December 1894, he died.

Stevenson’s time in Samoa and his accompanying voyages across the South Seas provide the focus for Farrell’s book. An emeritus professor at the University of Strathclyde and translator of literary works from Italian, Farrell comes armed with perceptive, elegant prose and a revealing understanding of Stevenson’s peculiarly Scottish frame of mind. For instance, he shows how Stevenson, brought up on Walter Scott’s Border ballads, was primed to collect and turn into fiction the island folklore he heard across Polynesia. At ease in Samoan society, Stevenson understood it through his knowledge of ‘the ethos and culture of community’ of the old Highland clan system. According to Farrell, Stevenson, the ‘lapsed’ Calvinist conservative, had ‘a quintessentially Scottish state of mind’. He was both comfortable in his new surroundings and impatient to remedy the evils he saw.

Many Europeans who had ventured to the South Seas before Stevenson had come to find ‘those elusive and imprecise factors termed exoticism, charm, mystique, glamour’. But by the time of Stevenson’s arrival, Samoa had been caught in powerful historical currents. Germany, Britain and the USA were all vying for colonial primacy, buying up the land and stripping the island of natural resources such as the coconut palm, which was converted into ‘a piece of productive machinery from which a profit could be extracted’.

From the beginning of his time in Samoa, Stevenson took the side of the local people, whom he considered ‘misunderstood, maltreated, and exploited’. He did so in his politically charged non-fiction work Footnote to History (1892), and also in a series of letters to The Times. Farrell writes illuminatingly about the reaction these letters elicited. The editors at The Times were perplexed by them. They openly wondered whether passion had warped his judgement and counselled Stevenson to return to his romances. Others agreed that he was squandering his talents on hopeless causes and that he should restrict his attention to imagined worlds.

But Stevenson emerges well from the episode, coming across as a man of fibre, unwavering in his support of the Samoan people and his condemnation of the ‘nincompoops’ who malevolently ran their affairs. Farrell frames his account of Stevenson’s activism with his famous statement, ‘I believe in the ultimate decency of things.’ He describes one particularly striking moment, when Stevenson threw a celebratory feast for the great and good of the island. ‘There is but one way to defend Samoa,’ he lectured them. ‘Hear it before it is too late. It is to make roads, and gardens, and care for your trees, and, in one word, to occupy and use your country … If you do not others will.’

Farrell’s biography is structured thematically rather than chronologically, with the consequence that it seesaws – and sometimes hurtles – across the years. The approach makes for some complex descriptions of politics early on, but if the first half of Farrell’s book shows us Stevenson as the campaigner, thereafter we see the writer at home on his island estate. This consisted of undulating land, ranging from 600 to 1,500 feet, and had ‘five streams, waterfalls, precipices, profound ravines, rich tablelands, fifty head of cattle on the ground (if anyone could catch them)’. Here, in the house he shared with his wife, Fanny, their extended family, servants and hangers-on, Stevenson was never alone. Farrell picks through the evidence relating to the Stevensons’ sometimes happy, often fraught marriage, which was so frequently the subject of discussion. But chiefly this was a contented time. Stevenson rose early in the morning and would be at work before the house was astir, always with a new book or two ‘on the stocks’.

He outlined the scope of his current and future literary projects in a letter of 1891. These included The Wrecker, a collaborative novel written with his stepson, Lloyd Osbourne. He also had in mind a work provisionally entitled ‘The High Woods of Ulufana’, a ‘story about as long as Jekyll, not so good’. He wanted to write a two-volume history of the South Seas, and also a work he called ‘Memoirs of a Scottish Family’, ‘sketches of my grandfather and father’. On top of this there would be two additional works of fiction: ‘The Shovels of Newton French’, ‘a curious kind of novel lasting from about 1600 to 1830’, and ‘The Pearl Fisher’, another collaboration with Osbourne, later published as The Ebb-Tide.

This short list of enormous projects is a fine testament to Stevenson’s restless creativity. Frequently beset by haemorrhages, he seems to have accepted that his life was to be short and so wrote at double speed. ‘The sheer volume of work is certainly impressive, even if the quality is, unsurprisingly, uneven,’ Farrell observes. The Wrecker was particularly disapproved of by the critics, but Farrell finds true quality in The Ebb-Tide, an adventure story set in the Pacific, in which a trio of desperadoes are hired to convey a shipment of champagne to Sydney. The inevitable failure of the enterprise leads them to an unidentified island and a man of ‘contorted ethics’ called Attwater. ‘A most grim and gloomy tale,’ Stevenson called it; to Farrell it ‘may be the most undervalued work in the entire Stevenson canon’.

Farrell offers plenty of anecdotes to enliven the scene. While the Samoans had no trouble believing their folklore to be true, they struggled to comprehend the notion that a man could earn his living simply ‘by putting words on a page’. After a morning’s writing, Stevenson would entertain himself with music, particularly the flageolet, which he played so badly ‘people fled from the sound’. In time the islanders came to love Tusitala (one of the nicknames Stevenson acquired), ‘the teller of tales’, as a devoted champion of their cause, a generous thrower of parties – 804 pineapples were consumed at his forty-fourth birthday celebrations – and an avid collector of stories. ‘Home is the sailor, home from the sea’ reads the penultimate line of the epitaph on his tomb on Mount Vaea. In Samoa, the traveller came to rest at last.