Random fact: John Steinbeck sometimes included a small drawing of a flying pig he named Pigasus next to his signature on letters or in books, along with the phrase ad astra per alia porci, or "To the stars on the wings of a pig."
According to a letter from his wife, "the little pig said that man must try to attain the heavens though his equipment be meager. Man must aspire though he be earthbound." On the other hand, it may have been a reaction to a college professor who told him he'd be a writer when pigs flew.
Unfortunately, I don't have time to track down earlier flying pigs, but later ones come to mind. Also, Lewis Carroll used the phrase in Alice's Adventures in Wonderland:
"I've a right to think," said Alice sharply, for she was beginning to feel a little worried.
"Just about as much right," said the Duchess, "as pigs have to fly...."