I think you have a 'ground loop'. This a condition where there is more than one path to ground from some part of the circuit. Check your wiring carefully. It will help if you draw what you have (it may turn out to be different from what you think you have). The sleeve of the jack is where your guitar connects to the amplifier ground. All ground coonnections in your guitar should go as directly as possible to that point.