Okay Kokil, continued(if you're still reading this). So the problem was in fact that the sub amplifier was grounded at two different points and their electrical potential was different enough to cause a hum current to flow between them. If you want to keep the sub in your preferred spot(without running an extension cord)there're at least two solutions: break the ground which runs through the sub power cord by using a "cheater plug"; or break the ground which runs through the shield of the sub cable to the other equipment. If you use the cheater plug the sub isn't grounded through its power cord but is still grounded, as Bren mentioned, through the shield on the sub cable. This is considered to be a less reliable ground and there's a fairly remote danger involved, but the call is yours.
If you want to keep the ground through the sub power cord and cut the one through the sub connecting cable, besides performing surgery on the cable, you might pick up a ground loop isolator such as
this one at RadioShack to connect between the end of the sub cable and the input on the sub. You'd also need an RCA plug-to-plug coupler such as
this one to connect the cable plug to the isolator plug.