Two goals in three first-half minutes had put the visitors in control, but the Eagles staged a stunning second-half fightback to take the points.
Aron Gunnarson put the Bluebirds ahead and Don Cowie doubled their advantage soon after, but Palace were a different prospect after the break.
Murray pulled one back from the spot, fired in a scrappy second to level the scores and, when the hosts earned another penalty, the former Brighton striker was on hand to stroke home the winner.
Palace started the brighter and Kagisho Dikgacoi tried his luck from distance early on but David Marshall was equal to the challenge.
Cardiff scored with their first meaningful attack and in slightly fortuitous circumstances. Peter Ramage attempted to halt Gunnarsson’s advance from midfield but the Icelandic international got a fortunate deflection and found himself one-on-one before finishing coolly past Julian Speroni.
Just two minutes later, and with only 15 minutes on the clock, the visitors doubled their advantage.
Craig Bellamy, a goalscoring substitute in the 2-1 win over Leeds and one of three changes to Cardiff’s starting XI, caused problems with his shot from distance and, when Palace failed to clear, Cowie seized the initiative to lash home the second.
It could have got even worse for the shellshocked hosts but Bellamy miscued a volley from deep inside the box and sent it flying well over the bar.
The luckless Ramage saw his afternoon curtailed by injury as Joel Ward was brought on to replace him, and Dikgacoi then spurned a presentable chance to reduce the deficit when he got on the end of Andre Moritz’s corner but his header was blocked by Mark Hudson.
The hosts got the breakthrough early in the second half when Andrew Taylor handled Moritz’s free-kick and Murray stepped up to convert the penalty.
It was Murray who threatened again moments later with a close-range shot which Marshall did well to tip past the post. Darcy Blake headed wide from the resulting corner.
Murray’s next involvement was more decisive and, after a shot from Moritz deflected to him at the back post, Murray squeezed a shot past Marshall from a tight angle to level it up with 62 minutes gone.
The comeback was complete 10 minutes later when Heidar Helguson fouled Jonathan Parr in the box and Murray kept his cool to score his fourth career hat-trick from the penalty spot.
Palace had to hang on through a nervy five minutes of injury-time but, with men behind the ball, they frustrated Cardiff to seal their third win of the campaign.