Personally I would start thinking
logic level mosfet like the ones in the link. You will not turn on fully (drive into saturation) the mosfet you have with a 5 volt output from a uC (assuming the uC has a 5 volt output and adequate current. Since the circuit is PWM I am not surprised the mosfet worked but as I mentioned, the mosfet is not being driven into saturation. It will get hot and eventually self destruct. On a side note I would likely use a diode more like a 1N4002 across the motor.
Ron