Larsson spoke of an incident which he said occurred when he was 15: he stood by as three men gang raped an acquaintance of his named Lisbeth. Days later, racked with guilt for having done nothing to help her, he begged her forgiveness—which she refused to grant. The incident, he said, haunted him for years afterward and in part inspired him to create a character named Lisbeth who was also a rape survivor. The veracity of this story has been questioned since Larsson's death, after a colleague from Expo magazine reported to Rolling Stone that Larsson had told him he had heard the story secondhand and retold it as his own. The murder of Catrine da Costa was also an inspiration when he wrote the book.
With the exception of the fictional Hedestad, the novel takes place in actual Swedish towns. The magazine Millennium in the books has characteristics similar to that of Larsson's magazine, Expo, such as its socio-political leanings and its financial difficulties.
Both Larsson's longtime partner Eva Gabrielsson and English translator Steven T. Murray have said that Christopher MacLehose (who works for British publisher Quercus) "needlessly prettified" the English translation; as such, Murray requested he be credited under the pseudonym "Reg Keeland". The English release also changed the title, even though Larsson specifically refused to allow the Swedish publisher to do so, and the size of Salander's dragon tattoo; from a large piece covering her entire back, to a small shoulder tattoo.