This is an absolutely crucial question to understanding this excellent novel. It is important to remember the context of slavery and racism that the novel is set in. To refer to a black person by the extremely derogatory term "ni****" was considered completely normal in those days. This fact should not obscure how, through the novel, Huck becomes gradually more and more aware of how Jim is a person in his own right, leading to his final decision to "go to hell" as he puts it, and work towards setting Jim free against the norms and values of his society:
It was a close place. I took it up, and held it in my hand. I was a-trembling, because I'd got to decide, forever, betwixt two things, and I knowed it. I studied a minute, sort of holding my breath, and then says to myself:
"All right, then, I'll go to hell!"--and tore it up.
Note here how much Huck has matured from a boy who was prepared to play cruel tricks on Jim to someone who is even willing to forsake salvation for Jim's rescue and happiness.
Of course, other critics point to other elements of the novel, especially the "evasion," as proof that it is actually racist. Consider the way that Tom Sawyer makes Jim suffer for so long, when he actually knows that he has been freed. Likewise, in Chapter 32, the much-quoted comment that Huck makes in response to Aunt Sally's question if anyone was hurt ("No'm. Killed a nigger"), might suggest that all the changes that have occurred in Huck have actually been reversed in the final section, as Tom takes dominance and Huck plays the role of sidekick.
Clearly there could be truth in such arguments, however, remembering the context of the time should help us to see the massive steps that Huck has taken in identifying Jim as a fellow human being worthy of freedom, love and respect. The "evasion" should not obscure this fact.