BEIRUT—Iranian rapper Shahin Najafi expected his song calling on a Shiite saint to save Iran from its current rulers to stir up controversy, but he never imagined it might cost him his life.

He is now being dubbed the Salman Rushdie of music after two influential clerics in Iran issued fatwas—religious edicts—justifying his murder on grounds of blasphemy.

"I...