I hate electrical problems. It could be a bad ground, at least that's what people always say when they don't know what the problem really is.
The fan should have a sesor that tells it when to turn on and off. Even if this sensor was stuck on it should still turn off when the key is turned off. I'd check the wiring starting from the fan and working back to wherever it goes. Try unplugging the connections and cleaning them.
If all else fails you could splice into the fan wiring and control it with a switch.