I say "something like" an urban legend because the latter are more typically sourced from "a friend of a friend." Or, in a more recent variety, from anonymous e-mail chain letters.
The experiment in question took place in 1963 and involved participants in an experiment being asked to shock another subject. The participants were told that the shocks were real but would not cause permanent tissue damage. The results seem to show a horrifying number willing to continue administer shocks under orders even when the person was crying in pain or even became unconscious.
Milgram's paper on the results of the study was published as Behavioral Study of Obedience by Stanley Milgram The Journal of Abnormal and Social Psychology 67:4 Oct 1963.
I've blogged about this before in : The Milgram Experiment 03/19/2010 and More critical perspective on the Milgram Experiment 03/19/2010. As I explained in those two posts, I'm highly skeptical of the value of the study, relying on observations from Erich Fromm in The Anatomy of Human Destructiveness (1973) and Charles Helm and Mario Morelli, "Stanley Milgram and the Obedience Experiment: Authority, Legitimacy, and Human Action" Political Theory 7/3 (Aug 1979).
Romm reports that Milgram's study is still attracting critics:
One of the most vocal of those critics is Australian author and psychologist Gina Perry, who documented her experience tracking down Milgram’s research participants in her 2013 book Behind the Shock Machine: The Untold Story of the Notorious Milgram Psychology Experiments. Her project began as an effort to write about the experiments from the perspective of the participants—but when she went back through the archives to confirm some of their stories, she said, she found some glaring issues with Milgram’s data.As Romm notes, the Journal of Social Issues published a September 2014 Special Issue: Milgram at 50: Exploring the Enduring Relevance of Psychology's most Famous Studies 70:3.
Among her accusations: that the supervisors went off script in their prods to the teachers, that some of the volunteers were aware that the setup was a hoax, and that others weren’t debriefed on the whole thing until months later. “My main issue is that methodologically, there have been so many problems with Milgram’s research that we have to start re-examining the textbook descriptions of the research,” she said.
The final article in that volume (Jolanda Jetten and Frank Mols, 50:50 Hindsight: Appreciating Anew the Contributions of Milgram’s Obedience Experiments) includes this in its Conclusion section:
While Milgram may not have provided all the answers to questions one can ask about his participants’ behavior, he did develop a paradigm that has kept many a social scientist intrigued to this day. Yet while his experiments seemed initially to provide very simple and intuitive insights into human behavior, today these insights no longer appear that obvious (or even compelling). Indeed, the more one delves into his work, the more one faces questions and the more difficult they become to answer. [my emphasis]