Doramin is one of the book's most prominent leaders and father figures. On Patusan, Doramin is the leader of the Bugis, a group of islanders, and he's the father of Jim's BFF, Dain Waris. Doramin himself becomes something of a father figure to Jim, and essentially adopts our wayward sailor into his tribe after Jim's brave actions upon his arrival.
He seems like a calm, cool, collected guy, so it's no wonder Jim looks up to him:
His impassive repose (he seldom stirred a limb when once he sat down) was like a display of dignity. He was never known to raise his voice. (26.1)
Everything is going smoothly for this father-son pairing until Gentleman Brown shows up and sets in motion a series of events that results in Doramin killing Jim. Yep, you heard that right:
Doramin, struggling to keep his feet, made with his two supporters a swaying, tottering group; his little eyes stared with an expression of mad pain, of rage, with a ferocious glitter [...] he clung heavily with his left arm round the neck of a bowed youth, and lifting deliberately his right, shot his son's friend through the chest. (45.25)
He's grieving over the death of his son, which he believes is Jim's fault, and he seems a bit out of his right mind. Jim's death is tragic on both ends. It's sad to see our hero die, of course, but we also feel sad for Doramin, who has just lost his son and finds himself killing a man who was as good as a son, too.
When you consider his dignified demeanor, Doramin's killing of Jim becomes all the more shocking. The guy who "was never known to raise his voice," is the very same dude that kills our hero in the end.