TL;DR: This quotation is the result of a kind of collaboration between William Wordsworth, James Thurber, and Leonard Bacon.
Here’s Thurber’s original version, or at least the version as quoted by Max Eastman—I have not been able to find the original, but presumably it was one of Thurber’s columns in the New Yorker:
I think humor is the best that lies closest to the familiar, to that part of the familiar which is humiliating, distressing, even tragic. Humor is a kind of emotional chaos told about calmly and quietly in retrospect. There is always a laugh in the utterly familiar. If a play is going on on the stage, a love scene, say, and from the wings a Scotty should wander on, with muddy paws, having got away from its owner’s dressing room, and if the Scotty should jump up on the best sofa and lie down, it would be funnier than if a kangaroo popped in.
James Thurber, quoted in Max Eastman (1936). Enjoyment of Laughter, p. 342. New York: Simon and Schuster.
Thurber clearly meant to allude to Wordsworth’s famous description of poetry:
I have said that poetry is the spontaneous overflow of powerful feelings: it takes its origin from emotion recollected in tranquillity: the emotion is contemplated till by a species of reaction the tranquillity gradually disappears, and an emotion, similar to that which was before the subject of contemplation, is gradually produced, and does itself actually exist in the mind.
William Wordsworth (1800). Lyrical Ballads, second edition, volume I, p. xxxiii. London: Longman.
But the allusion is rather clumsy: perhaps Thurber was relying on his memory of Wordsworth. The critic Leonard Bacon, in a 1936 review of Enjoyment of Laughter, spotted the allusion, and proposed an improvement:
This is what he [Thurber] says: “Humor is a kind of emotional chaos told about calmly and quietly in retrospect.” The phrasing is careless, but “emotion recollected in tranquillity” meant poetry to Wordsworth. Would “emotional chaos recollected in tranquillity”—or anything else have meant humor to him?
Leonard Bacon (1936). Review of The Enjoyment of Laughter by Max Eastman. In Saturday Review of Literature, volume 15, p. 10.
The substitution of “remembered” for “recollected” must have taken place some time between 1936 and 1956, for the quotation appears in this form (attributed, wrongly, to Thurber) in a review in The Publishers Weekly, volume 190, p. 63.