Turn the power for the fan off at the main circuit.
Loosen the fan grill. Use the stepladder to reach the fan, if needed. Some models require that you remove the screws holding the fan grill in place, while newer models are held in place with spring clamps. Set this aside.
Locate the model number of the fan motor. Use a shop vac to clean out any dust or debris, If the fan is dirty and you can't find the number. Use this model number to find a replacement motor.
Pull the blower off the shaft. On older models, the blower may be held in place by a screw, while the newer, plastic blowers simply pull off.
Unplug the motor from the socket inside the fan. Remove the motor from the fan housing. Again, depending on the make and model of the bathroom fan, this process can vary. Some motors are held in place by screws, while others are secured with tabs. Use a screwdriver to pry back tabs to remove the motor, if needed.
Install the new motor. Secure in place with the screws or tabs, depending on your fan model. Plug the motor into the fan outlet.
Reattach the blower.
Restore power to the fan circuit. Turn on the fan switch and test to make sure it works. Replace the fan grill.