MOSFET circuit working but no reverse

I am using a mosfet as a switch for a dc motor controlled by an arduino mega. I want to be able to also reverse the direction of the motor. Can this be done with a mosfet? Maybe a P type mosfet?

No, you need either 4 transistors in an "H-bridge" configuration or at least 2 relays depending on the motor specs which are unknown. Something like this for small motors.

Would something like the attached image not work?

download.png

njdurkin:
Would something like the attached image not work?

That circuit is using two complementary power supplies, which indeed only requires two switching devices, but is rarely if ever used for standard motors as the cost of the second power supply exceeds the cost of two more
switches.

H-bridge is definitely what you need, but not knowing what motor you have I can't recommend any particular H-bridge.