NEW YORK — Goldman Sachs, arguably the most storied investment bank on Wall Street, has been compared to a money-sucking vampire squid and called the evil empire of finance. On Wednesday it got an entirely different kind of black eye — delivered by one of its own.

Greg Smith, an executive director at the bank, resigned with a blistering editorial that accused the bank of losing its “moral fiber,” putting profits ahead of customers’ interests and dismissing customers as “muppets.”

The stinging editorial, “Why I Am Leaving Goldman Sachs,” appeared in The New York Times, was the talk of Wall Street and was widely circulated online. Smith became a trending topic on Twitter, the social network website.

Goldman swiftly issued a three-sentence statement disagreeing with Smith. “In our view,” the bank said, “we will only be successful if our clients are successful. This fundamental truth lies at the heart of how we conduct ourselves.”