It's unlikely that it would become "corrupt" in the normal sense - mice don't tend to have any writeable software (or firmware) that could be corrupted by a dodgy write and the stuff it does have is generally so low level it'll probably either work completely or not work at all.
That said, all hardware does stop working eventually. Has it had the gunk that collects on the bottom cleaned off? Could the cable have been pulled sharply and thus become unseated? Could it have been dropped? Any sign of frayed wires, cracked case etc.?
Also, what sort of defective is it? Will the pointer move, even a little or in the wrong direction? Do clicks still work? Does it not work all the time, or only periodically? Did this come on suddenly or gradually? You say it would stop working after a short while of being connected - do you mean that you get a short period of functionality every time you plug it in, or that you only had one short period of functionality and it's never worked since?
Finally, just to make sure: this isn't a wireless mouse that needs batteries changed, is it?