Servo stops working after first rotation

I've got an 5V Arduino Nano (it still works despite it's age) hooked up to a DGServo S05NF STD and I'm trying to rotate it 180 and back to 0 after receiving a SerialEvent. The rotation sort of works, but starts to twitch back and forth for a few seconds and then doesn't receive any more SerialEvent calls. If I comment out the servo calls, the builtin LED works fine as an indicator, and SerialEvent works over several messages. Using the USB supplied 5V and tested with Sweep successfully.

Any thoughts would be appreciated:

#include <Servo.h>

const int SERVO_PIN = 9;

Servo servo;
int pos = 0;
String input = "";
bool inputComplete = false;
bool servoRunning = false;
unsigned long pMillis = 0;
const long DELAY = 3000;

void setup() {
  Serial.begin(9600);
  input.reserve(200);
  servo.attach(SERVO_PIN);
}

void loop() {
  if (inputComplete) {
    if (input.equals("d")) {
      initServo();
    }
    input = "";
    inputComplete = false;
  }

  if (servoRunning && millis() - pMillis > DELAY) {
    returnServo();
  }
}

void serialEvent() {
  while (Serial.available()) {
    char inChar = (char)Serial.read();
    if (inChar == '\n') {
      inputComplete = true;
    } else {
      input += inChar;
    }
  }
}

void initServo() {
  pMillis = millis();  
  servoRunning = true;
  digitalWrite(LED_BUILTIN, HIGH);
  servo.write(180);
}

void returnServo() {
  servoRunning = false;
  digitalWrite(LED_BUILTIN, LOW);
  servo.write(0);
}

A servo can suck more power than a standard USB port can provide. A USB is only supposed to give 500mA with negotiation and 100mA without. The Nano doesn't attempt to do this negotiation.

Power it from a separate supply - a phone charger is often a good source of 5V. They usually have a much higher current limit.

eightlines:
hooked up to a DGServo

Why have you "stepper" in your title?

You can correct the title by editing your Original Post.

...R

Thanks for pointing that out. Edited.