Follow the instructions here and it should work fine
How to Set Up an Xbox Controller for a PC
USB port troubleshooting
The Xbox 360 Controller for Windows needs a powered USB port. If the controller is not working correctly, try changing the controller to a different USB port. Avoid using USB hubs or the front ports on a PC. Unpowered hubs or ports might not provide enough power for the controller. For best results, plug the controller into another USB port on the back of the computer.
Typically, the ports on the back of a computer are powered ports. Ports on the front of the computer may not be powered ports. An external USB hub doesn’t provide powered ports if it doesn’t have its own separate power supply or AC adapter.