Micro Servo 9g motor rotates automatically when powered on without PWM signal

If there is no connection to the servo signal cable the internal electronics will not know what to do so it may well behave randomly.

I presume, when you say PWM signal you mean the output from the Servo library?

The servo should NOT be powered from the Arduino 5v pin, it should have its own power supply with a common GND with the Arduino.

If those comments don't make sense please post your program.

...R