Common problem when using front audio sockets on PC cases. Likely a ground loop issue. The front sockets are commonly grounded to the case. As they are also grounded at the motherboard, this creates a loop. It can be an easy fix, or more of a DIY job, depending on the case.
Also, the majority of cases use cheap wires, which can pick up EMI (electromagnetic interference) from the various components. Winding the cables round or through a ferrite core/ring can help to reduce the interference. That will make little to no difference though if the ground loop issue is still present.
Do you get any interference issues when connecting your headphones to the rear socket?