No, Oscar Wilde did not say ‘No good deed goes unpunished.’ This phrase is often attributed to various sources, but there is no evidence that Oscar Wilde ever said or wrote it. The exact origin of the phrase is unclear, but it has been used in various forms over the years.
The sentiment behind the phrase reflects the idea that even well-intentioned actions can sometimes lead to negative consequences. While Oscar Wilde is known for his witty and often cynical observations, this particular phrase is not among his documented quotes.