What the heck happened

Got this m18 12Ah battery and it burned the motor up on my hole hang in under a minute. WTF will any type of warranty cover it? Why wouldn't they be compatible?