“Mary Shelley” is a rarity: a literary biopic with an argument. Which is by no means to say that the film, directed by Haifaa al-Mansour (“Wadjda”) forgoes the expected pleasures of the genre. You get candlelight and quill pens, Regency gowns and celebrity shout-outs (Samuel Taylor Coleridge, in the house!), and of course the usual feverish attempts to convey both the passion and the discipline of the writing process. Also good-looking young actors declaiming poetry and prose in crisply accented, grammatically flawless English.

But rather than smother Mary Shelley — author of “Frankenstein,” daughter of two eminent writers and wife of another — with soft cushions of antiquarian cultural prestige, Ms. al-Mansour and the screenwriter, Emma Jensen, sharpen the sense of Shelley’s modernity. It helps enormously that she is played with alert sensitivity and acute intelligence by Elle Fanning.

We first encounter Mary in motion, dashing home from a London cemetery where she has been scribbling furiously at the graveside of her mother, Mary Wollstonecraft. That Mary, who died shortly after giving birth to her daughter, was the author of “A Vindication of the Rights of Woman,” a work of 18th-century feminist thought that has yet to lose its radicalism or its relevance. Wollstonecraft’s husband, the novelist, philosopher and bookseller William Godwin (Stephen Dillane), has remarried, and Mary must contend with a mean stepmother (Joanne Froggatt) who disapproves of her writing.

Video

A preview of the film.

William, to keep peace in the household, sends Mary off to Scotland, where she meets Percy Bysshe Shelley (Douglas Booth), a dreamy dirtbag lit bro who will in due course die young and be remembered as one of the great English poets of his time. Percy is 21 and has already abandoned one wife and child, but his capital-R romantic idealism includes a few clauses about free love that chime with Mary’s rebellious inheritance. Also he has soft lips, delicate cheekbones and a way with rhymes, so before long Mary has run off with him and brought her stepsister, Claire (Bel Powley), along on the adventure.

It turns out rougher than Mary, who is 16, anticipated. There is tragedy, scandal, money trouble and Percy’s mercurial (though in some ways entirely predictable) behavior. The commitment to unconventional, liberated lives that he and Mary share means different things to each of them, and the film emphasizes the gap between theory and practice when it comes to equality between the sexes. Traditional roles may oppress and stultify women, but the free-and-easy hedonism Mary and Claire find with Percy and Lord Byron (a scene-stealing Tom Sturridge) is no great bargain either.

But Byron’s Swiss chateau is nonetheless where the seed of “Frankenstein” is planted, and “Mary Shelley” is as much a biography of that book as of its author. The book originates during a highbrow parlor game at Byron’s, where Mary, Claire and Percy are hanging out with a physician named John Polidori (Ben Hardy). But the film expands on this origin story, suggesting various streams of Mary’s experience that feed into her chronicle of a misunderstood monster. Her childhood fondness for scary tales and the literary influence of her father (author of the Gothic novel “Caleb Williams”) combine with her own grief, frustration and isolation to produce a masterpiece.

This account is plausible and moving, at once a defense of genre fiction and of female creativity. But at times the differences between male and female writers can seem a bit schematic, in a way that undermines Mary’s intellectual autonomy. William, Percy and Byron are understood to be motivated by ideas, while Mary’s inspirations come from the realm of feeling. “Frankenstein” is thus, above all, a triumph of expression, the quasi-therapeutic transformation of pain into art. Some of the durable insights it offers to readers — into the risks of scientific inquiry and technological innovation, into the philosophical complexity of human identity — are slighted in favor of its cathartic power in the life of the writer.

Still, the acknowledgment of Mary Shelley seems long overdue, and “Mary Shelley” is a reminder that England in the early 19th century remains a rich repository of stories and characters, an era that can be made to feel charmingly quaint and bracingly modern, on both the page and the screen.