I’ve been following the lives of different people – farmers and builders, bankers and weavers, paupers and aristos – throughout the Napoleonic wars, as we have come to call them. The conflict lasted 22 years from 1793 to 1815, broken briefly by the Peace of Amiens in 1802-03. One in five families were directly affected and more men died, proportionately, than in the first world war. Against this background, as if trudging through inclement weather, people struggled to get on with their lives, but if private interests often blocked out wider issues the war affected everyone – including writers and readers.

In Jane Austen’s novels, the war is unseen yet ever-present. Her brother Henry was an officer in the Oxfordshire militia and, later, a contractor to the military, and several relatives were prominent in the local Volunteers. She was wryly alert to the sexual flutter aroused by scarlet uniforms and camps such as Brighton where Lydia Bennet imagines herself “seated beneath a tent, tenderly flirting with at least six officers at once”. Lydia had many real-life counterparts, in all classes. Two more Austen brothers, Frank and Charles, served in the navy: many contemporary readers would share Fanny Price’s concern for her midshipman brother William in Mansfield Park, and recognise the picture of crowded wartime Portsmouth. Austen sprinkled Mr Price’s excited description of the Thrush leaving port with the names of her brothers’ ships. The novel was just “something in hand”, she told Frank, “and by the bye – shall you object to my mentioning the Elephant in it, & two or three other of your old ships? – I have done it, but it shall not stay, to make you angry. – They are only just mentioned.”

The art lies in the “only just mentioned”, like the casual report in Persuasion of Captain Wentworth’s fortune from prizes in the West Indies. She had no need to explain. And she could see, too, how fictional alarms and social fears could overlap. In Northanger Abbey – written largely during 1798–99, a time of food shortages, riots and bank crises; of a clampdown on workers in the Combination Acts; of rebellion in Ireland and scares of French invasion – Eleanor Tilney is aghast when Catherine Morland hints that “something very shocking indeed” will happen in London, “more horrible than anything we have met with yet”. While Catherine is simply looking forward to a new gothic thriller, Eleanor thinks at once of a “dreadful riot”. Instead of books, her mind leaps to potential danger to her eldest brother: she immediately pictures to herself a mob of 3,000 men assembling in St George’s Fields; the Bank attacked, the Tower threatened, the streets of London flowing with blood, a detachment of the 12th Light Dragoons (the hopes of the nation) called up from Northampton to quell the insurgents, and the gallant Captain Frederick Tilney, in the moment of charging at the head of his troop, knocked off his horse by a brickbat from an upper window.

Many found it hard to be so playful. Closing their eyes to unrest at home and mass death abroad, readers turned to old stalwarts and pastoral consolations. The favourite works were still William Cowper’s poem The Task and James Thomson’s series of four poems The Seasons; the new bestseller was Robert Bloomfield’s The Farmer’s Boy. Even Coleridge’s and Wordsworth’s daring Lyrical Ballads of 1798 were, in their own way, a retreat from politics, an attempt to find a more enduring truth in nature and the language of the people. Both poets had been profoundly disturbed by the onslaught against radical opposition, seen in the Treason Trials of 1794, the “gagging acts” that followed, and their own alarming, if comical, experience of being suspected as spies at Alfoxden in 1797.

Yet they were not wholly silenced: Coleridge blasted government policies in his journalism, writing through the war with fiery, swerving brilliance. And while Wordsworth’s political sonnets became increasingly loyalist, he was ruthless in examining his own trajectory in the poem that would become The Prelude. He took pains, too, to show the unseen casualties, like Margaret in “The Ruined Cottage”, sinking into decline as she waits for the return of her soldier husband, an out-of-work weaver who had taken the enlistment bounty to feed his family. The impoverished weaver-soldier, a familiar figure in the north, found his place in the popular literature too, in the broad dialect of Lancashire’s John o’Grinfilt ballads.

To the political establishment the Lake poets seemed dangerous, as well as wilfully experimental, and they were furiously lampooned, alongside other radical intellectuals, in the government-sponsored Anti-Jacobin, founded in late 1797, illustrated by Gillray’s stinging cartoons. Female writers were pilloried too, including Mary Hays and Mary Wollstonecraft, who had died in childbirth the year before. Such women were pronounced unnatural rebels, “Unsex’d Females”, prone to “Gallic freaks or Gallic faith”. In the fog of suspicion and propaganda, radical presses were shut down and the public were assailed by loyalist broadsides and pamphlets.

Facebook Twitter Pinterest Jane Austen … the war is unseen yet ever-present in her novels. Photograph: Courtesy Everett Collection/Re

Amid widespread anxiety about the dangers of the “mob”, one publishing sensation of the 1790s was the success of Hannah More’s evangelical Cheap Repository Tracts. Writing to her friend Elizabeth Montagu, More pointed out how eagerly village people read chapbook tales of ghosts, highwaymen and heroes. More alarming still, they read democratic urgings based, in her view, on the French philosophes. Even worse was the potential for atheism – a common fear given impetus by the publication of Thomas Paine’s The Age of Reason. As More put it to Zachary Macaulay: “Vulgar and indecent penny books were always common, but speculative infidelity, brought down to the pocket and capacities of the poor, forms a new era in our history. This requires strong counteraction.” She would replace this French “poison” with her own halfpenny papers. The first tract, published in March 1795, sold 300,000 copies in three weeks; within a year the number reached 2m, handed out by employers, clergymen and parish officials and carried by pedlars in their baskets, alongside the chapbooks.

A different literary battle took shape in the next decade. In October 1802, during the Peace of Amiens, Archibald Constable backed the lawyers Francis Jeffrey and Henry Brougham, the economist Francis Horner and the clergyman and wit Sydney Smith, in founding the Edinburgh Review, or Critical Journal. The Edinburgh was highbrow, long and expensive at five shillings, full of polemic, exhaustive book reviews and articles on travel, science, politics and finance. Its effect was electric, thought the lawyer Henry Cockburn, and particularly cheering, because so many thoughtful men were “alarmed lest war and political confusion should resource a new course of dark ages”. Within a few years this liberal Whig journal had a competitor. The war in Spain caused violent splits: government supporters urged support for Wellington, while the manufacturers and workers hit by trade blockades clamoured for peace. In March 1809, when Francis Jeffrey argued for appeasement in the Edinburgh, Walter Scott joined the publisher John Murray in founding the Tory Quarterly Review, to press for backing of the war. The journal soon played a powerful role in shaping writers’ careers – praising Byron (one of Murray’s authors), publishing Scott’s review of Emma, damning Hunt, Hazlitt and Shelley, and killing Keats, so Leigh Hunt believed, with its cruel review of Endymion.

But if the literary scene was influenced by reviewers, much popular reading was unaffected by critical opinion, or by Hannah More’s evangelical drive. Every child in artisan and labouring families devoured penny adventures. The future Chartist leader Thomas Cooper collected them from the “number man”, or travelling bookseller, buying the stories of famous highwaymen, of “Bampfylde Moore-Carew the King of the Gipsies” and “the old ballad of Chevy Chase”. He repeated the stories when alone, “until they used to make me feel as warlike as did the sight of Matthew Goy when he rode into town with the news of a victory; or the array of the Gainsborough Loyal Volunteers when they marched through the town, on exercise- days, to the sound of the fife and drum”. And if the war allowed an overlap between fictional heroism and local volunteers, it also provided images for disasters at home, like the enclosures that surrounded John Clare’s village of Helpstone in 1809: “Inclosure like a Bonaparte let not a thing remain, / It levelled every bush and tree and levelled every hill / And hung the moles for traitors – / though the brook is running still, / It runs a naked brook, cold and chill.”

For school boys, even classical texts took colour from their wartime world. In later life, stuck at a German spa, the publisher William Chambers had only one English book, Pope’s translation of the Iliad. He could not help thinking, he said, “that exactly fifty years had elapsed since I perused the copy from Elder’s library, in a little room looking out upon the High Street of Peebles, where an English regiment was parading recruits raised for Wellington’s Peninsular campaign”.

Stirring tales of ancient wars, medieval legends and Oriental magic appealed to all readers – and two writers saw this clearly: Byron and Scott. After Byron’s first collection, Hours of Idleness, was savaged in the Edinburgh Review, he retaliated with English Bards and Scotch Reviewers, ridiculing the whole literary scene. When this was published, to some uproar, in March 1809, he left England on travels in Spain, the Eastern Mediterranean and Greece that would give him copy for poems to thrill stay-at-home, war-bound Britain. In 1812, on the publication of the first cantos of Childe Harold, he “woke up famous”, as he put it. Yet with the romance came unsparing criticism of the futility of war, the wasted heroism of the Peninsular regiments at Albuera, “glorious field of grief”, and at Talavera, where “Three gaudy standards flout the pale blue skies”, and the armies met, “To feed the crow on Talavera’s plain, / And fertilise the field that each pretends to gain.”

Facebook Twitter Pinterest Glorious fields of grief … Lord Byron. Photograph: Apic

Scott, by contrast, found “gaudy standards” something to savour. After the success of Minstrelsy of the Scottish Border, full of raids and battles and “songs to savage virtue dear” – perfect fodder for dashing volunteers – he nurtured his line in historical romance. Profoundly conservative, he presented the Borders and then the Highlands as places where feudal values of courage, loyalty and sacrifice ruled, now lost to a world of contracts and commerce. With The Lay of the Last Minstrel and Marmion: a Tale of Flodden Field, his popularity rose. In 1810, The Lady of the Lake, set at the time of James V’s battle with the clans in the early 1500s, sold 30,000 copies. “It is cold and raw and damp,” wrote the teenage Sarah Spencer, ‘so that we can’t stir out, and if it were not for ‘The Lady of the Lake’, I don’t know what we should be reduced to … But I do so love every word that man ever wrote, that I have been enjoying the book over and over again, till I am ashamed of returning to it.” Tourists dashed to the poem’s setting, Loch Katrine, where Scott’s Ellen rowed her skiff across the lake among “mountains that like giants stand / To sentinel enchanted land”. Begun towards the end of the war, Scott’s Waverley novels remained in the enchanted land of the past, and the British public devoured them as if they could fend off the alarms of the modern world: new baronial-style mansions were decorated with “ancient” weapons, specially manufactured in Birmingham.

Austen was an admirer, sending her copy of Scott’s Marmion to Charles in the West Indies “very generous in me I think”, and taking refuge from boredom with Byron. Later generations would recognise her own genius, and the pioneering spirit of Coleridge and Wordsworth: but at the time of Waterloo, weary of the darkness of war, what British readers wanted, it seemed, was irony, wit, local colour – and unashamed romance.

• Jenny Uglow’s In These Times: Living in Britain Through Napoleon’s Wars, 1793-1815 is published by Faber.