beaglebone black not being detected when plugged in through USB cable

As far as I know, there is a known problem related to hot plugging USB devices at BBB.
Try connecting Desktop computer before restart the board.