There are a lot of possible reasons. You will need to eliminate each one until you find the solution.
First, all systems have a certain amount of noise which becomes worse when the volume, and especially the gain, is turned up. Is this a new problem, or is it something that has been happening since Day 1?
Make sure your ground actually goes to ground. Modern amps have three-pin plugs for a very good reason.
The sound goes away when you unplug the (guitar?) cord, which may indicate that the noise is being sent to the input along with the signal from your guitar, rather than originating internally. Have you recently started playing in a different room? Are there fluorescent lights in the room? A TV set? A computer? These are all potential noise sources that can couple unwanted signals into your guitar, or the cord. You can try to locate a noise source by seeing if the buzzing gets louder or softer depending on where you stand, or which way you face.
When you plug in, is there a single 'pop' sound, or is there a lot of crackling? A worn input jack will loosen up to the point that it doesn't make a good connection to the plug.
If none of these things nails it for you, take your amp in to have a tech look it over.