It seems the earliest stories are myths, legends, and folktales that millions believed to be true. When did people begin writing intentionally fictional stories that everyone knew wasn't true?

by TueuEnSerie
itsallfolklore

The folktale is an ancient genre that was consistently told as fiction. They were the oral "novels" of the folk. Most of the Grimms' fairy tales are of this genre, and many have histories that reach back centuries. Recent efforts to chart older pedigrees for some of these tale types have stretched histories into the thousands of years. Since most people have a counterpart of the folktale, it is likely that this fictional genre of oral narrative had a counterpart in prehistory.

At the same time, there was stories told to be believed; folklorists usually describe these narratives with the term "legend," but classicists use the term "myth." This genre of story ran parallel with the folktale, and it has been more successful in surviving into a post-modern time. While urban modern people do not tell fictional narratives lasting thousands of words, they continue to tell stories to be believed - what we commonly refer to as "urban legends."

So we now have a situation where stories told to be believed survive (with roots into prehistory), but people rely on other media (novels, film, television; etc.) for "intentionally fictional stories."

To your question, when did people begin writing fictional stories, I will leave that for others to answer. There is evidence of folktales appearing in writing in the ancient world, but we cannot always be certain if they were understood to be fictional, even though that may have been likely.