After the ship hits the iceberg and starts sinking, we see Murdoch taking money from Kate Winslet's rich, evil boyfriend (Billy Zane) in exchange for a spot in a lifeboat. Murdoch later throws the money in Zane's face, but still, a good guy wouldn't have taken it in the first place. Later, the crew is trying to keep the desperate passengers from rushing to the lifeboats when someone tries to get past them ... and Murdoch kills him.
"You'll all get your turn! Well, not you, obviously."
At the same time, another passenger is accidentally pushed forward. In the confusion, Murdoch kills him, too. Ashamed of what he has done, Murdoch turns the gun to his head and blows his brains out right there (when he could have just waited, like, five more minutes and let the ocean do the job for him).
But in Real Life ...
For all the insane amount of work James Cameron put into getting the Titanic to look just right, he didn't seem to give much of a crap about how he portrayed the real people in it. William Murdoch was really the name of the first officer of the Titanic, but other than that, they are completely different people: Not only was he not a coward and a murderer, but he actually saved people's lives. There's even a plaque to his memory in his hometown in Scotland, where he's remembered as a hero.
Notice how nowhere in there does it say "shooting poor people."