Possibly defective front panel headphone/mic connector/cable or problem with case front panel. Most cases have both an HD audio and an AC97 connector for the front panel, that plugs into the motherboard. Normally, the HD Audio should be used. If you are using the HD Audio connection, try the AC97. If you are using the AC97, use the HD Audio instead.
If neither of the connectors change anything, and the audio works OK with the rear connections (with no front panel connection to the motherboard), the problem would appear to be in the case front panel assembly.