I think you wired the motor wrongly. When you add power it turns a little before beeping.
Have you tried disconnecting the motor and just test it with a servo or anything else you know works.