How to drive this MOSFET with a microcontroller?
Be SURE that you are implementing this circuit.
 Diode is needed (1N400x will do to start for motors under a few amps) 



The MOSFET you are using is marginal for use with 5V gate drive.
 A "logic FET" with a lower gate turn on voltage will be better.

The action you describe indicates either that the MOSFET is dead or connected wrongly.

The above circuit diagram is modified from fig 8. here
 This is a useful page that will teach you things that you want and need to know.