Racism is a sensitive topic, and so it has been one I've tried to avoid tackling. To me, variations in gender, skin color, ethnicity, disabilities, orientation of any type do not make one less of a person but only create a beautiful diversity.
Baum did not shy away from depicting an ethnically diverse world, though his world of Oz and many of the surrounding countries tend not to show any human people who he specifically says are not Caucasian. (There is an exception, but we'll get to that later.) However, as projects like The Wiz, The Muppets' Wizard of Oz and Oz the Great and Powerful show, there's no reason why some of these people couldn't look like people of ethnicity. (Since we'll presume that the actual ethnicity of the people of Oz is Ozian.)
This is not to say that ethnic diversity doesn't creep up in Baum's fantasies. Typically, it's not exactly human. In Sugar-Loaf Mountain and Dot and Tot of Merryland, there are dark-colored candy people. Reflecting the status of his day, Sugar-Loaf Mountain mentions that the dark-colored sugar people seem to be of a lower status than those who are made of white sugar. (The story does call into question prejudice when a couple characters question their constitution and are either shamed or shunned because of it.)
Dot and Tot is a little more controversial: there is a mention that chocolate servants are not very dependable. It could be that Baum wasn't thinking of race but that an overindulgence of chocolate causes one's stomach to feel queasy. (The Candy Man does say "They are only chocolate, you know, and quite harmless when taken in moderation.") However, it could be read as an insult to African-Americans. (They are referred to as "colored servants" by the Candy Man.)
In The Patchwork Girl of Oz, Baum introduces a lively group of people called the Tottenhots, who are the only explicitly black people in Oz that he mentioned. The Tottenhots are based on the Khoikhoi people of South Africa, who were once called "Hottentots." (Now considered a derogatory term.) These people are peaceful, though they are also playful: they toss around the Scarecrow and Scraps, and both admit that actually helped evenly distribute their stuffing. However, in Rinkitink in Oz, during Bilbil's restoration to Prince Bobo, he is turned into a Tottenhot, which Baum calls "a lower form of man." Now, it can be noted that perhaps Baum means that the Tottenhots weren't actually human, but humanoid, but it is rather unnerving. (Books of Wonder dropped some unflattering Tottenhot pictures from their reprints.)
Actual people of differing ethnicity appear in Baum's books: The Woggle-Bug Book containing some regrettable freely done stereotypical depictions with unflattering dialect. However, not all depictions are quite so regrettable. Nux and Bryonia in The Boy Fortune Hunters series, despite suffering from Baum's tendency to give characters unfortunate dialects, are actually fine upstanding characters, and even proud-to-be-an-American Sam Steele holds them in high respect. Aunt Hyacinth in The Daring Twins has put the Daring children's welfare in a high priority, even though she really doesn't have to.
In Mary Louise in the Country, a shopkeeper reveals some poor opinions held in Baum's day:
"I take it you're one o' them new folks at the Kenton Place," he remarked.Here, Baum implies that Mary Louise doesn't appreciate this, and in the Mary Louise series, Aunt Sally and Uncle Eben are depicted rather positively. (Until Adopts A Soldier, but I don't believe that part was actually written by Baum.)
"Yes," said she.
"Thought ther' was plenty o' dishes in that place," continued Mr. Jerrems, in a friendly tone. "But p'r'aps ye don't want the black folks t' eat off'n the same things ye do yerselves."
Mary Louise ignored this speech and selected the dishes she wanted.
Baum's work for adults and the Boy Fortune Hunters series also contain a variety of peoples, but they must be treated as a product of their time: they are adventure stories that happen in other lands, only a few of which Baum actually visited. There are good and bad people of all types in these stories, including white people.
Thus, when it comes to Baum's fiction, we must understand that he was a product of his time: the concepts of "racism" or "politically correct" didn't exist, and if you wanted to make fun of another ethnic group, you could do so, and most other people would laugh. Many of the popular songs in The Wizard of Oz musical extravaganza contained ethnic humor and stereotypes, and even much later in 1925, Larry Semon's Wizard of Oz silent film contains black actor Spencer Bell, billed as "G. Howe Black," playing a character named Snowball who plays up more negative African-American stereotypes than you can shake a stick at.
Being an actor and scriptwriter, it is without question that Baum was well aware of this humor and would incorporate it into his work. Thus, while his work must be seen in the context in which it was originally written, overall it gets a free pass for not being exceptionally negative. Regrettable inclusions from a bygone age. Many fans would like to believe that Baum would be for equal standing for all if the wrongs of stereotyping and making fun of other ethnic groups were made clear to him. I can't help but think that his visit in Egypt had a hand in making him more appreciative of other cultures.
The source most people cite when criticizing Baum in this regard is a couple columns for his newspaper The Aberdeen Saturday Pioneer. In the first, dated December 20, 1890, Baum laments the death of Sitting Bull and states his belief that with Sitting Bull, so went any nobility the Sioux possessed. While blaming white people for this, he recommends that they might as well finish the job and kill the rest so they might not further damage the storied image of the Sioux.
This reads strangely for Baum, who never before or afterward suggested genocide (except for the Wooden Gargoyles). Some fans have suggested that he didn't write it. Others believe that it was meant sarcastically. I, on the other hand, have to accept that he was serious.
In Eric Gjovaag and John Bell's tackling of this topic, they point out that Baum was under a lot of stress at this time. His time in Aberdeen was coming to an end, a time that he had anticipated with wide-eyed optimism. He'd sunk a lot of money, work and time into making a home for his family in Aberdeen and had met with failure. After the closing of his store, Baum's Bazaar, he turned to running a newspaper. But business dwindled even further with the newspaper, and now his wife was pregnant with their fourth child. He was growing particularly argumentative, and slipped into one of the darkest moments of his life.
While I have never had the same type of stress Baum suffered, I can understand why he might suggest death to the Sioux. Likely Aberdeen citizens feared that if it wasn't for the army, they could be attacked and murdered by Indians at any moment. What Baum wrote (and restated January 3rd, 1891) is inexcusable, but it served its purpose at a time of widespread bigotry and fear of the Sioux.
While Baum seemed to fall on another hard time and lost the newspaper eventually, it prompted him to leave Aberdeen, which was certainly a good move for him given the state of mind he was in. It was what led him to Chicago to other opportunities, and eventually to the World's Fair with its splendid White City that appears to have inspired the Emerald City. The earliest inspirations for Oz began to pull Baum out of the bad place he'd fallen into.
In this context, this worst of all of Baum's works reveals that Baum was a very human man. For creating the Land of Oz, a place where everyone is welcome, we often put Baum on a pedestal, envisioning him to be the embodiment of those traits. But just like all of us, Baum had his faults. Writing a suggestion to exterminate the remaining Sioux was wrong, what Baum wrote was repugnant, but we must realize that he never did the same thing again. He had his reasons for feeling that foul when he wrote, but that does not stop it from being wrong: he did not allow any such feelings (if he held them, which some of his later work like "The Enchanted Buffalo" from Animal Fairy Tales suggest was not the case) to pervade his later works.
Thus, while what Baum wrote about the Sioux under a time of great personal stress and fear is very bad, it cannot be used to completely write him off as a "racist."