Is it 2 or 1 wire? Could be the wire for the ABS sensor on the hub. Is your ABS light on? Could also be knock sensor, oil pressure switch.
Worst case take a look at the other side w/ the wheel off and see if you have a matching wire like this one and see what it goes to.