Metafiction is nothing new. Some scholars argue that even ancient texts such as The Odyssey have meta elements. I noticed meta elements in other classic works such as Tom Jones and Tristam Shandy.
In what will be the first and probably last time I mention Jane Austen in this blog, it should be noted that her first novel, Northanger Abbey, was a metafiction satire of horror’s ancestor, the gothic novel. Within the first page, Austen tells us that the protagonist, Catherine, is a fictional character, and that she is determined to be the heroine of her own gothic fiction story. Catherine spends her free time reading books such as Ann Radcliffe’s The Mysteries of Udolpho, and all of her decisions are made through the lens of genre convention.
I’m always discovering new things, so there may be other precedents in horror fiction proper, but the first metafiction horror novel I discovered was The King in Yellow. Prompted by reference to the book in Lovecraft’s essay Supernatural Horror in Literature, I hunted down a pricey copy in the 1990’s, and it was quite a challenge. Now, The King in Yellow is readily available in both print and ebook editions, and has inspired tribute anthologies such as A Season in Carcosa. Perhaps you can thank the popularity of True Detective for bringing it into more mainstream popularity.
Robert W. Chambers’ The King in Yellow was published in 1895 and borrowed concepts from Ambrose Bierce’s Can Such Things Be?: An Inhabitant of Carcosa & Other Stories. In turn, it influenced Lovecraft’s own mythos and films such as John Carpenter’s In the Mouth of Madness. The King in Yellow is a collection of interconnected short stories about a book called The King in Yellow which is a best-seller that spreads “like an infectious disease” across Europe. People who read the book go insane, believe that they are characters within the book, and in some cases are driven to acts of extreme violence. Although the final stories in the collection lose their way, the first few are effective and disturbing, making this a worthwhile read for fans of horror and weird fiction.