Beaglebone black gets shutdown signal when I move rc motors
It isn't clear from your post if you're powering the motor directly from the BBB GPIO pins. But just so you know, the BBB's GPIOs can source, at most, 1mA. You're almost certainly exceeding this if you're attempting to power any kind of motor. It's right to shut down, it would quickly overheat and destroy itself. 

You need a buffer between your GPIO and motor. Connect your GPIO pins to an op amp as an emitter-follower, or a transistor configured as a follower. You'll need another line from your 5V supply to either the op amp or the collector of the transistor. 

Even if you are not powering it from the BBB directly, definitely add in a bypass capacitor from 5V to ground, on the order of 10uF or higher. As has been said, the capacitor will compensate for small voltage drops from surge currents. THe drops occur because most regulators are just slow to compensate for fast line changes.