The Duke is a con artist of about thirty who teams up with a second, older con artist called the King when they are both run out of town and end up taking refuge on Huck and Jim's raft. The Duke insists that he is from the line of the Dukes of Bridgewater, and he wants people like Huck and Jim to bow down to him.
Huck quickly realizes the Duke is a liar, and in Huck's words a "low-down humbug" and a "fraud." However, he wisely decides to keep these insights to himself and keep the peace, stating,
If I never learnt nothing else out of pap, I learnt that the best way to get along with his kind of people is to let them have their own way.
The Duke soon shows himself to be a coldhearted criminal who, along with the King, is willing to throw Huck and Jim out of their beds on the raft so that they have to sleep in the rain. The Duke holds the people he defrauds in contempt and laughs at them with the King. The Duke also drinks.
As time goes on, Huck recognizes more and more clearly that the Duke, like the King, is a dangerous man who has no moral values, cares about nobody but himself, and exhibits greed that knows no bounds. The Duke will cheat anybody, no matter the pain it causes, and is willing to break up slave families and sell them down the river.
The Duke shows the dangers and evils that lurk on the river. Twain also uses the Duke to poke fun at the upper classes when Huck decides this greedy criminal is no different from a real duke.