"The Secret Life of Walter Mitty" (1939) is a short story by James Thurber. The most famous of Thurber's stories, it first appeared in The New Yorker on March 18, 1939, and was first collected in his book My World and Welcome to It (Harcourt, Brace and Company, 1942). It has since been reprinted in James Thurber: Writings and Drawings (The Library of America, 1996, ISBN 1-883011-22-1), is available on-line on the New Yorker website, and is one of the most anthologized short stories in American literature. The story is considered one of Thurber's "acknowledged masterpieces". It was made into a 1947 movie of the same name, with Danny Kaye in the title role, though the movie is very different from the original story. It was also adapted into a 2013 film, which is again very different from the original.

When was the secret life of walter mitty written? Okie... think carefully first, then make a decision:
The relevant information to answer the above question is: "The Secret Life of Walter Mitty" (1939) is a short story by James Thurber. So, the answer is James Thurber.