Etymologically speaking, the word takes its root from the Old English lǣwede : ignorant, unlearned.
Then in the Middle English it got transformed into leud/lewed (found those two ways to write it): belonging to the common people, vulgar.
It then derived into the mean worthless, vile, evil, leading to its current usage and connotations.
Even thought there are a lot of slightly different definitions of the word lewd, I decided to provide the KnowYourMeme's definition because it does correspond to the meme definition and not the word definition :
Lewd is an adjective often used to describe something of erotic nature, or otherwise obscene or indecent. It is generally being used to represent the reaction of a character who is ingenuous or timid.
The first known meme use of this word is, like a lot of Western memes, on 4chan in 2008.
On the chans /jp and /a (Respectively the Japanese Culture and Anime & Manga 4chan communities), the word was used in several conversations.
In 2008, the chan /jp was created in order to split general Japanese Culture from /a which then became the Otaku board.
On /jp, the meme was associated with pictures of Eiki Shiki from Touhou in order to criticize lewd anime content which was judged as "not suitable" for the board.
The post on November 19th, 2008 that most likely created this meme, according to KnowYourMeme, is this comic and its reaction :
According to Google Trends, the peak of research of the word lewd is in 2011. I didn't find any rationnal explanation; I will edit the post to add things if I find anything interesting.
Lewd but I approve
A trend emerged from the meme lewd, to express the fact that a user finds the below content lewd but still approves of the content. It is presented the same way as the lewd meme, but on the pancart there is written: Lewd but I approve
The pokemon Gardevoir has became a meme because of the feminized look it has. The meme is used at different ways (Tsundere Gardevoir, Shy Gardevoir, Totally NSFW Gardevoir). A lewd version of Gardevoir frequently used on 4chan :