It will lose it's ability, and will get Motor Drive instead. And Motor Drive is generally better anyway. If it has Vital Spirit, it will stick because all three of them have it. So basically, it will keep the ability if the evolution has it, but if the evolution has a different one, it will change.
Hope I helped! :)
Source and partly Experience.