Walt Whitman's "Song of Myself" has the craziest speaker situation in any poem we know of, so bear with us here. At Shmoop, we usually don't refer to the speaker of a poem by the author's name, but here it's pretty unavoidable: in Section 24, the speaker just busts out and says, "I'm Walt Whitman!" But that doesn't mean you can say that the speaker is the biographical Walt Whitman who wrote the poem. No, this speaker is a super-charged Walt Whitman, who has been places and done things that the real Walt could only dream of.
This "Walt Whitman" character is, as he says, a "kosmos," or an entire universe. He's like a giant magnet drawing everyone and everything into itself. He knows exactly how you and everyone else feels, and his powers of empathy are unparalleled. He's been all over America and all over the globe, and even outer space. Also, his two best friends happen to be the two persons that also live inside his body – how convenient. These guys are the "Me Myself" and the "Soul." There's no clean division between these different personas; they are more like masks that Whitman puts on and takes off. He speaks for his soul but stands apart from it.
He's a good friend of you, the reader. He is constantly addressing the reader as "you." He seems to think that you and he are on a journey together, and that he's your guide. He challenges your sense of pride and tries to goad you into thinking for yourself. It's clear that he has really soaked up the ideas of the American Transcendentalist Ralph Waldo Emerson, whose notion of "self-reliance" is essentially, "learn by experience and don't trust everything you read from books or hear from other people." It's equally clear from the elevated language and interesting words he uses that the speaker has read the Bible and a lot of Shakespeare. Whitman has Shakespeare's flair for the dramatic, as in the famous standoff with himself from Section 28: "You villain touch! What are you doing? My breath is tight in its throat, unclench your floodgates, you are too much for me."
Whitman seems to have it out for organized religion, too. He doesn't like churches and hierarchies, though he's quick to point out that he doesn't "hate" them, either: "I do not despise you priests" (section 43). That's because he doesn't hate anything. Nonetheless, he sides with the "prophets" against the "priests." In other words, he believes that truth arrives through individual inspiration and not through received doctrines.
However, the one thing that gets him more excited than anything else is sex. Or at least the body. He loves bodies, particularly the strong, muscular bodies of strapping young men. Ladies are cool, too, but he's just not quite as excited about the womenfolk. Read into this what you will – plenty of other people have. Also, he feels no shame about sexuality and doesn't think that sex is "shameful" or "immoral."
As for his political beliefs, the speaker is clearly against slavery in the years running up to the Civil War. He shelters a runaway slave. But he doesn't hate Southerners for slavery. He just wishes everyone would realize that they are brothers and sisters and get along. He's a passionate democrat (with a small "d") and believes in the idea and promise of America.
There's much, much more to say about the speaker, but the poem itself is dedicated to saying it. That's why it's called, "Song of Myself."