Logical resonance has been demonstrated to be present in the FitzHugh–Nagumo (FHN) neuron, namely, the FHN neuron can operate as a reliable logic gate within an optimal window of parameter. Here we attempt to extend the results to the more biologically realistic Hodgkin-Huxley (HH) model of neuron. In general, biological organisms have an optimal temperature at which the biological functions are most effective. In view of this, we examine if there is an optimal range of temperature where HH neuron can work like a specific logic gate, and how temperature influences logical resonance. Here we use the success probability P to measure the reliability of the specific logic gate. P increases with temperature T, reaches the maximum in an optimal window of T, and eventually decreases, which indicates the occurrence of temperature-induced logical resonance phenomenon in HH neuron. Moreover, single and double logical resonances can be induced by altering frequency of the modulating periodic signal under the proper temperatures, suggesting the appearance of temperature-controlled transition of logical resonance. These results provide important clues for constructing neuron-based energy-efficient new-fashioned logical devices.