Recently in Luffy's new move,the Red Hawk, he catches fire. Is his haki immune to fire? Even Sanji's leg would catch fire in his Diamble Jamble.
What you are talking about is Busoshoku Haki
Busoshoku Haki is a form of Haki that allows the user to use their spirit to create, in essence, an invisible armor around themselves.
Now according to this link
Luffy used Busoshoku Haki combined with Gear Second to perform "Gomu Gomu no Red Hawk", which causes his fist to ignite into flames and create an explosion after it hits the target.
So with the help of Busoshoku Haki one can create an invisible armor to protect themselves and then use it. That's the possible explanation I can come up with.