are you recording through a computer?
if you are try turning off your monitor. I know guitars pick up the hum off monitors and tvs.
something else that helps is make sure you have none of your input levels all the way up (e.g sound card mixer) anything your guitar or mic runs through needs to be balanced out without putting your volume all the way up on any component.