The movie pedant is here to say that movie was I Want to Live from 1958. In the movie, the character had it coming, but the movie itself was still anti-death-penalty propaganda.
Carol Burnett did a memorable and hilarious send up on her show, but I can't find a clip.