Akainu is a Logia user who turns into magma. However, Luffy was wearing a coating of Ace's blood and his own sweat/water on his fist. Furthermore, Akainu was corporeal at that moment because he was mid-attack (forming his fist) and had just been hit by Whitebeard's quake, which disrupted his concentration. The blood/water on Luffy's fist acted as a temporary, non-Haki bypass.
This is a common point of confusion for One Piece fans. The short answer is: when does luffy use haki in marineford ep
Luffy is trying to reach Ace. He is exhausted, injured, and desperate. Squard has just stabbed Whitebeard. As Luffy screams for Ace, he lets out a massive burst of willpower. Akainu is a Logia user who turns into magma