To those who haven't read the book (shame), the first half of "A Study In Scarlet" tells of how Dr. Watson first meets the strange consulting detective and watches Holmes solve a mysterious double murder. The second half tells the history leading up to the revenge killings. The book was banned because the second half is set in Mormon Utah.
Mormons of the 19th Century
Little was known in Victorian England about Mormons beyond the basics: it was a religious cult that had isolated itself in the Utah desert, was run as a theocracy by a dictatorial Brigham Young, practiced bigamy and was rampantly xenophobic.
Conan Doyle was not attempting to write a scrupulous treatise on Mormon culture, he was writing a ripping good yarn. He did not get every dot and tittle of the history right but neither did Shakespeare in "The Merchant of Venice" nor Boris Pasternak in "Dr. Zhivago." Still, he was right enough for fiction.
Reality of 19th Utah
Young proudly described himself as dictator of Utah, granting to himself "the right to dictate about everything connected with the building of his Zion, yes even to the ribbons the women wear" (source).
Polygamy was not because there was a surfeit of women. Like all of the West, there were many more men than women in Utah. Polygamy was then as it is now all about male power. Both Brigham Young and Joseph Smith took in plural marriage the wives of other church members. In 1884, the church stripped church leadership positions from monogamous men; plural marriage became a requirement for leadership (source). In 1890, Mormons gave up their multiple wives as the price of statehood.
In the early years of the church in Utah Mormons enforced doctrinal orthodoxy through the notion of "blood atonement" - the ritual murder of sinners. From the death of Joseph Smith until 1927, Mormons were required to swear an "Oath of Vengeance" against America and that all Mormons were "the sworn and avowed enemies of the American people." Even today Mormons who reach the rank of priesthood are required to take "blood oaths."
"If any miserable scoundrels come here,
cut their throats." ~ Brigham YoungCertainly the most famous of the blood atonements was the Mountain Meadows Massacre. In 1857 a band of settlers from Arkansas bound for California encountered Mormons near what is now Zion National Park. In Cedar City the travelers were refused service when they tried to buy supplies. Leaving town the travelers were followed by several men who attacked the wagon train. The travelers circled the wagons for defense and a siege ensued. After several days Mormon Elder John D. Lee entered the wagon circle and convinced the travelers to surrender their belongings in exchange for safe passage. The men and boys were separated from the women and girls and all began marching back to Cedar City under Mormon guards. After about a mile the guards turned their guns on the men and boys and shot each and every one. The adult women were murdered as well. Seventeen young girls were kidnapped and passed out to loyal Mormon families. In all 120 people were murdered. The site was dressed so the Mormons could blame the massacre on Paiute Indians.
This was Utah when Conan Doyle wrote his story. All in all he got the sense of things pretty accurately.