Note This applies to controllers you bought individually and to controllers that came with your Xbox. The important thing is, your controller must be under warranty.

Standard limited warranty for Xbox One controllers is 90 days; the standard limited warranty for your Xbox is longer. If you bought a Microsoft Complete extended service plan, your controller is covered for up to two exchanges within three years of buying the plan.

Replace your controller:

Exchanges require a registered Xbox, even if you bought your controller separately.
Sign in here to see your registered Xbox consoles, or to register an Xbox for the first time.

If an Xbox isn’t listed, select Register device and enter the info for your console.

In your list of Microsoft devices, select your Xbox.
Note Don’t worry if your Xbox shows as out of warranty. It’s the warranty for your controller that matters here.