A ground loop, which is created when two or more pieces of connected, grounded equipment are drawing power from the same source, can cause an annoying humming sound that comes through your guitar amplifier. Using an A/C adapter that converts the amp's plug from three to two prongs is a common method for avoiding ground loop hum, but this is dangerous. The safest and easiest way to eliminate the noise in either a recording or performing environment is to connect the amp to a direct box en route to the mixing board.
Plug the amplifier into the power source and connect the electric guitar via a 1/4-inch cable.
Locate the output on the amplifier. Most amps have at least one 1/4-inch output so the signal can be sent to a mixer or external speaker.
Connect the amplifier's output to the 1/4-inch input of the direct box with a 1/4-inch cable.
Plug the XLR cable into the direct box's output and connect the other end of the cable to the live or recording mixer.
Make sure that the "Instrument/Speaker" switch on the direct box–if it has one–is on "Instrument."
Turn all components on and listen to determine whether there is a low humming sound. If this sound is present, locate the "Ground Lift" switch on the direct box and turn it on. This should completely eliminate the ground loop noise.
If you have a direct box without a ground lift switch, you can purchase a special XLR cable that has a built-in ground lift. Replace the regular XLR cable with this one and it should have the same effect as using the ground lift switch on the direct box.
Don't ever remove the ground prong–the bottom one–on a power cable in an effort to reduce ground loop hum; though it might eliminate the noise, this takes away an important element in protecting you against electrocution.