Without a true story of adultery and retribution, Shakespeare's intimate, sexually charged sonnets might never have been published. Saul Frampton reveals the part played by the playwright's arch rival and the identity of the mysterious Dark Lady

On 20 May 1609, the publisher Thomas Thorpe stepped off Ludgate Hill into Stationers' Hall, and registered what was to become perhaps the most famous poetic works of all time: Shakespeare's Sonnets. It was a slim volume on publication, containing 154 poems over 67 pages, and the edition is now extremely rare: only 13 copies survive. But its influence has been all-encompassing, providing a template for language, for literature, for love, ever since. Recent years have seen the sonnets disseminated in ways that Shakespeare could never have imagined. "Shall I compare thee to a summer's day?" is quoted 5m times on the internet. Apps have been created in which famous voices recite the poems, sonnets are tweeted, T-shirts are printed, and poetry that was once said to circulate only among Shakespeare's "private friends" is now stored for ever in the cloud.

Yet despite the popularity of the sonnets, their mysteries continue to puzzle readers. Who were the young man and "dark lady" of the poems' sexual intrigues? And did Shakespeare want these poems published, or kept private? Literary theory advises against such biographical speculation. Yet modern bibliography stresses the messier side of literary life: that texts are physical not abstract entities; that printers were sometimes pirates, not always with their author's interests at heart. In addition, text databases such as Early English Books Online allow one to isolate the unusual aspects of a writer's vocabulary, and therefore suggest what they might or might not have written. And these techniques help to link together a series of exciting discoveries about the sonnets: that an arch-rival of Shakespeare's may have masterminded their publication; that their publication was therefore an act of revenge; and that the "dark lady" at the centre of the story was not a poetic fiction but a real person.

Recent scholarship has asked whether these intimate, sexually charged poems were published with Shakespeare's permission, with the consensus being that they were not. The story the sonnets told – of the poet's obsession with a young man (almost certainly Henry Wriothesley), and of a ménage à trois involving the poet, the young man and a married woman – would probably have struck many 17th-century readers as sordid (albeit a good read). The poems end with images of disease – of "fever", "strange maladies" and a "seething bath" – seen by some to refer to the "sweating tubs" used to cure syphilis.

Given these embarrassing personal details, it seems unlikely that Shakespeare would have approved of the sonnets' publication. Scholars point to the carelessness of the editing compared with Shakespeare's previous poems, "Venus and Adonis" and "The Rape of Lucrece"; the likelihood that Thorpe had published bootlegged material before; and the fact that Shakespeare's previous poems went through a number of editions, whereas the sonnets were never republished in his lifetime. And then there is another puzzle. The sonnets are entered in the Stationers' Register as "Shakespeares sonnettes", but when printed a few months later they had gained an additional long poem, attributed to Shakespeare, but very different in both style and language, entitled "A Lover's Complaint". It relates the psychological drama of a woman who has been abandoned by a sonneteering lover, yet many have found it perplexing in its archaic language and yet constant neologising:

From off a hill whose concaue wombe reworded,

A plaintfull story from a sistring vale

My spirits t'attend this doble voyce accorded,

And downe I laid to list the sad tun'd tale,

Ere long espied a fickle maid full pale

Tearing of papers breaking rings a twaine,

Storming her world with sorrowes, wind and raine.

According to the OED, the poem features 26 new words or usages – "acture", "fluxiue" – coining words 14 times more frequently than the preceding sonnets, or once every 13 lines. It seems odd that Shakespeare would have followed poems whose beauty lies in their rhythm and meaning with a work that is so awkwardly neologistic. As a consequence, many do not regard "A Lover's Complaint" as being Shakespeare's work. The RSC's Complete Works excludes it from its pages. In an exhaustive stylistic analysis the Russian linguist Marina Tarlinskaja concludes that it "cannot possibly belong to 'mature' Shakespeare", and sees it as untypical of the rest of his career. And while some have interpreted the poem as a reappraisal of the "female complaint" genre – where a wronged woman reflects on her abandonment – it seems to have left most readers cold.

But when we read the poem with an open mind as to its author, another reading seems to emerge. For whereas the sonnets seem to revel in the seductive wit of the male sonneteer, "A Lover's Complaint" uses the female voice to launch a scathing attack on the poet/seducer. What's more, the individual identified by the poem seems to be less a hypothetical figure and more a living poet whose work enjoyed a popular reputation: "hee didde in the general bosome raigne / Of young, of old, and sexes both inchanted". In other words, the poem looks like an assault on Shakespeare himself. It refers to the "gouty landlord" of his works (Shakespeare had an extensive property portfolio by this time), and hints at his fathering of illegitimate children:

Heard where his plants in others Orchards grew,

Saw how deceits were guilded in his smiling,

Knew vowes, were euer brokers to defiling,

Thought Characters and words meerly but art,

And bastards of his foule adulterat heart.

The poem ends in a savage indictment of the lustful seducer: "O that infected moysture of his eye / … O that sad breath his spungie lungs bestowed." The scholar Brian Vickers concludes that it cannot be Shakespeare's: "The Latinate diction of 'A Lover's Complaint' differs in kind from Shakespeare's normal practice … relying on what I would call scholastic words, smelling of the dictionary."

❦

It is possible that Shakespeare knew Thomas Thorpe. But we are certain that the Elizabethan lexicographer and translator John Florio did. In 1610, Thorpe dedicated his edition of Thomas Healy's Epictetus His Manuall to Florio, thanking him for securing the backing of William Herbert, the Earl of Pembroke, for Healey's translation of John Hall's The Discovery of A New World, entered into the Stationers' Register in January 1609, and probably edited or added to by Florio. So Florio was involved in the two works published by Thorpe either side of the Sonnets. All of which makes the volume's dedication to "WH" look very likely to have been a reference to William Herbert (who was later to fund the First Folio). But it also puts Florio in closer proximity to the Sonnets than any other likely candidate. Besides, Florio knew or had known Shakespeare, sharing a patron with him in Henry Wriothesley in the early 1590s. Florio had gone on to become one of the most important scholars of his time, translating Montaigne (1603) and Boccaccio (1620) and compiling the first proper Italian-English dictionary, A Worlde of Wordes (1598).

Arch rival … John Florio. Photograph: Getty Images

Florio's involvement in the publication of the Sonnets would seem to be confirmed when we look at the language of "A Lover's Complaint". Along with its incessant neologising – one of Florio's literary traits – it features a host of words never used by Shakespeare and rarely or never by his contemporaries, yet which can nevertheless be found in Florio. For example, neither Shakespeare nor Marlowe nor Jonson use "storming", "defiling", "maund", "blend", "blazoned", "outwards", "gouty", "amorously", "oblations", "plenitude", "laugher", "weepingly" "vnshorne". All are used by Florio repeatedly – he uses "amorously" 19 times – and sometimes in an identical fashion: for example, both the poem and Florio write "vnshorne veluet".

And then we come to the volume's oblique dedication:

TO THE ONLIE BEGETTER OF THESE INSVING SONNETS Mr. W.H. ALL HAPPINESSE AND THAT ETERNITIE PROMISED BY OVR EVER-LIVING POET WISHETH THE WELL-WISHING ADVENTVRER IN SETTING FORTH

Again, Shakespeare never wrote "begetter", "adventurer" "these in/ensuing", "wisheth the" or "promised by", and nor did Marlowe (Jonson used "adventurer" once). Florio, on the other hand, used them all.

Given these linguistic fingerprints, and his working relationship with Thorpe, it seems very possible that Florio wrote "A Lover's Complaint" and organised the publication of the Sonnets as a whole. Indeed the layout of the volume, with the poems spilling over the page, is strongly reminiscent of the pirated edition of Philip Sidney's "Astrophel and Stella" (1591), probably edited by Florio. A possible scenario is that Florio procured funding and/or the manuscript of the Sonnets via William Herbert, who, according to the First Folio, knew and admired Shakespeare. Florio then added "A Lover's Complaint" to the text, passing it off as Shakespeare's.

Why would Florio seek to attack and embarrass Shakespeare in this way? In The Genius of Shakespeare Jonathan Bate speculates that the "Dark Lady" of the Sonnets might have been Florio's wife, the sister of the poet Samuel Daniel, and the daughter of a west country music teacher (sonnet 128 has her playing the virginal). However, by the time of the publication of the Sonnets in 1609 she had probably died (Florio remarried in 1617). The pirated publication of the Sonnets would therefore seem to represent Florio's revenge. This interpretation is more plausible when it becomes evident that Florio had form in this area: this was not the first time he had attacked Shakespeare in print.

❦

In September 1594, around the time Shakespeare's sonnets were probably being composed, the London printer John Windet brought out a long, pedestrian poem entitled "Willobie his Avisa: The True Picture of a Modest Maid and of a Chaste and Constant Wife". The address to the reader was signed "Hadrian Dorrell", and claimed that the poem had been found in the papers of his friend "Henry Willobie" – names that seem a smokescreen for someone who didn't want to be known. The poem goes on to tell the story of a married woman named "Avisa" who is plagued by a number of seducers, only to chastise them for doubting her constancy. It singles out two in particular: a young, impulsive aristocrat called "Henry Willobego", and an "old player" called "WS".

It goes on to invoke notions of "comedy" and "tragedy", calling "HW" and "WS" a "new player" and an "old actor" respectively. Unsurprisingly, many have taken "Henry Willobego" to be Henry Wriothesley and "WS" to be William Shakespeare, a reading supported by the homophobic insinuations that litter the text. But who wrote the poem? A clue is given by the Italian proverbs it contains: Viui, Chi vince (Who lives, vanquishes); Ama, Chi ti ama (Love him that loves you); Il fine, fa il tutto (The end makes all); Grand Amore, grand Dolore (Great love, great sorrow); Chi la dura, la Vince (Who suffers, overcomes); and Fuggi quell piacer presente, chi ti da dolor futuro (Flee present pleasures, that afterwards bring sorrow).

In a search of 128,000 books from the 15th to the 17th century, these proverbs only occur in three other texts. Chi la dura, la Vince is used in a translation of a Dutch emblem book of 1608. But the same proverb as well as the other five are only found in two other texts, both written by the same author: John Florio, in his language manuals, his First Fruits and Second Fruits of 1578 and 1591. That it is Florio who lies behind "Dorrell" and "Willobie" is also suggested by the poem's distinctive vocabulary. It has a taste for neologisms and uses a number of rare words which, although not found in either Shakespeare, Marlowe or Jonson, can nevertheless be found in Florio.

Rafe Spall as Shakespeare in the 2011 film Anonymous.

In addition to the linguistic evidence, Florio also knew the printer, John Windet, from his 1590 edition of Sidney's Arcadia. But perhaps the most important factor linking Florio to the text is the fact that he knew both Wriothesley and Shakespeare – the targets of the poem's satire. Despite its ostensibly fictional status, the narrator is at pains to affirm that the story is based in reality: "Though the matter be handled poetically, yet there is some thing under these fained names and showes that hath bene done truely."

❦

If "Willobie his Avisa" was therefore intended as a defence of his wife's chastity, the pirated sonnets and "A Lover's Complaint" would seem to be Florio's revenge for the fact that it had failed. His attack in 1594 may have been only partly successful: Wriothesley may have broken with Shakespeare, but it had not proved fatal to Shakespeare's career. But 15 years later, and with his wife now dead, Florio set about trying to destroy Shakespeare's reputation. To some extent, the plan worked. The sonnets were never republished in Shakespeare's lifetime, which suggests that they were immediately suppressed. And in the following year, Shakespeare seems to have left literary London and returned to Stratford, giving up writing soon after.

❦

One question remains. Who was Mrs Florio, the woman at the heart of the scandal? We know from 17th-century sources that Florio married Samuel Daniel's sister. But as to further biographical facts, details are scarce. Avisa, "Willobie" tells us, was born "At wester side of Albion's isle". Samuel Daniel came from the west country, but his baptismal record has never been found. But a previously unnoticed note in William Slatyer's History of Great Britain (1621) would seem to associate Daniel with the villages of Wilton and Great Bedwyn, a few miles south of Marlborough.

This link to Wilton/Great Bedwyn would seem to tally with further clues in "Willobie" as to Avisa's roots. The poem alludes to an "ancient castle" and nearby: "a Christall well; / There doth this chast Auisa dwell." Walking a mile west from Castle Copse – the site of a Saxon castle – brings you into Wilton, with its natural springs, its name deriving from the West Saxon wielle – well. There is even a "Well Cottage" on the main street. So Samuel Daniel and "Avisa" would appear to have come from Wilton in Wiltshire. The records of St Mary's Great Bedwyn – the parish church for the area – reveal a record of the marriage of Johannes (John) Danyell to Johanne (Joan) Feldon on 23 November 1550. So this could be Samuel Daniel's father and mother. There is no mention of a Samuel Daniel in the parish records, but what about a sister?

No one knows the name of Florio's wife. Nevertheless the author of Willobie cannot resist giving a clue as to Avisa's real name. He says that he knows of one, "AD", who could "indure these, and many greater temptations with a constant mind". Obviously this would seem to allude to Avisa's maiden name – "AF" might have been a little too obvious for Florio's liking. And then in the additions made to the 1596 edition of "Willobie", the reader is warned against attempting to work out Avisa's real identity:

"If any man … should take occasion to surmise, that the Author meant to note any woman, whose name sounds something like that name, it is too childish and too absurd, and not beseeming any deepe judgement …"

From this we deduce that her real name began with an "A", and sounded similar to "Avisa".

❦

And so we return to St Mary's, Great Bedwyn, with its tomb to John Seymour, its 12th-century nave, and its doleful 1 ton bell. For here, on 8 February 1556, a female child was baptised whose name cannot help but invite speculation. A child born to John and Joan Danyell, but given a relatively uncommon name (ranking 58th most popular at the time). A child that grew into a woman – if she is that woman – who inspired some of the greatest writing of all time, but survives only as a series of poetic relics: her eyes, her breasts and her hair. A woman who was musically talented, but who died, along with most of her children, probably of the plague at the turn of the 16th century.

The name on the baptismal register: Avis Danyell.

• Saul Frampton is writing a book about John Florio and Shakespeare.