Jim is portrayed as being very unintelligent through the first third of the novel. The trick that Tom and Huck play on Jim is thoroughly stereotypical as is Jim's assertion of his knowledge of the devil and of superstition.
Seen together, these characterizations of Jim seem quite denigrating, negative, and lacking respect. The fact that Jim is repeatedly fooled by simply tricks on the part of Huck Finn adds to the sense that Jim is truly a fool.
...parts of Jim's character belong to a traditional stereotype of the "happy darky"—an imaginary portrayal of the slave as simple, childlike, and contented.
Jim is presented as a person with real humanity, with feelings, thoughts and rights of his own. However, he is not, ultimately, seen as being equal to his lighter skinned counter parts.
Finally, even though Jim is technically "free," he is not recognized as a man by the other characters, or by the larger social world he inhabits.
The notion that freedom and equality are not parallel concepts in this world is clearly articulated by Pap Finn when he rails against the free negro he sees in town (wearing a clean white shirt). Pap derides the man bitterly and does not recognize any relationship of equality between himself and the free African American man.
Jim remains subservient, even when his humanity is recognized. When Huck humbles himself to learn a lesson from Jim, it is important to note that any humbling has to take place at all. Instead of simply admitting he was in the wrong, Huck must engage in social politics to apologize to an African American.
As a "role", Jim's status as an African American is deeply coded and constrained. Huck's humility before Jim participates in this socially codified, stereotypical way of looking at Jim.
There are several moments on the river that qualify as demonstrations of Jim's moral dignity. When he chastises Huck for tricking him, many critics find a moral maturity that buoy's the moral value of Jim's character:
...he tells Huck, "dat truck dah is trash; en trash is what people is dat puts dirt on de head er dey fren's en makes 'em ashamed."
Jim's fatherly treatment of Huck on the raft is also morally dignified as Jim demonstrates his subtle understanding of Huck's emotional needs. As a boy, Huck is not independent enough to be free of the need for coddling. He needs extra sleep as well compared to Jim.
Jim offers Huck these things naturally, though he is under no obligation to do so. This free giving is certainly a mark of moral dignity with a strength that goes well beyond the chastising Jim offers to Huck. Being Huck's comforter and friend in their time on the raft proves Jim's moral dignity even while he is portrayed as otherwise foolish, dim, and long-suffering.