But I am wondering what the earliest book is in English that uses bad spelling for humor value.
I realise I'm somewhat stretching the scope of your question, but if you include plays as "books", and in the context of spoken dialogue you interpret "bad spelling" to include the author putting the wrong word in a character's mouth for the audience's amusement, then malapropisms offer some early options.
The term "malapropism" itself is derived from the surname of Mrs Malaprop, a character in Richard Brinsley Sheridan's comedy of manners The Rivals, which was first performed in 1775. Mrs Malaprop is a moralistic widow, and guardian of the main character Lydia; as the primary comic figure in the play, she frequently chooses a word that sounds like the one she means, but is completely (indeed, ludicrously) wrong in the context. It might therefore be thought of as a verbal spelling error.
Examples of her misspoken words:
"Sure, if I reprehend any thing in this world it is the use of my oracular tongue, and a nice derangement of epitaphs!" [Likely substitutions: "reprehend" for apprehend; "oracular" for vernacular; "derangement" for arrangement; "epitaphs" for epithets]
"illiterate him quite from your memory" ["illiterate" for obliterate]
"she's as headstrong as an allegory on the banks of the Nile" ["allegory" for alligator]
While Sheridan's play gave the modern name to this technique, its use for comic effect goes back much earlier. In Shakespeare's Much Ado About Nothing, first published in 1623, the attempts of his comic character Constable Dogberry – an officious, incompetent, amateur police chief – to appear sophisticated result in tortured descriptions and ridiculous malapropisms.
Perhaps Constable Dogberry's best-known line is when he reports the arrest of two villains:
"Our watch, sir, have indeed comprehended two auspicious persons." ["comprehended" for apprehended and "auspicious" for suspicious].
Interestingly, as a result of this popular play such vocabulary errors became known as dogberryisms, a term that endured until the arrival of Mrs Malaprop.