Original Razor MX500, MX650, and SX500 motors should have two flat spots on the motor shaft directly behind the sprocket that a 9mm open-end wrench will fit on to hold the shaft steady.
Then a 12mm open-end wrench, combination wrench, or socket wrench can be used to remove the nut. The threads are counterclockwise so to remove the nut the wrench needs to be turned in the clockwise (right hand) direction.
If the motor shaft does not have two flat spots behind the sprocket for an open-end wrench to slide onto, then the way that Paul removed his motor's sprocket is a good way to do it. For more motor sprocket removal methods please see the post that Paul started titled "Motor shaft nut removal?" at this link: https://support.electricscooterparts.com/support/discussions/topics/1000088487
Please let us know how it goes.