Using MOSFET to control positive side of motor?
You need to control the 12V motor with a P channel mosfet. Using an N channel MOSFET (as per your schematic) will result in less than 12V applied to the motor due to the gate-source threshold voltage not being zero. Of course if you can make your PWM signal more like 15 Vp-p then this will probably work fine.

A P channel mosfet would work like this: -



The circuit above will work from logic level signals so there's an added bonus but, if you truly have a 12V PWM signal then you can drive the MOSFET gate directly but, be aware that the gate capacitance might upset your PWM voltage a bit AND the p channel MOSFET does invert the signal.