Why does this N-channel MOSFET not turn off?
There is a parasitic diode in your MOSFET (aka the body diode) that will keep your output current flowing irrespective of how you believe you are controlling the device: -



Maybe you meant the MOSFET source and drain to be swapped but screwed-up?