It depends on the transistor. You might not be driving it to full saturation, or it's "on resistance" may be too high to pass enough current to drive the motor. You'd need to tell us the specific transistor, as well as the specs on the motor before we could figure out what's going on.
An LED draws a whole lot less current than a motor, so the transistor may not have any problem powering your LED. (You usually need a current limiting resistor when you drive an LED from 5V to avoid burning it out.)
I would suggest using a MOSFET transistor instead. This one, for example, can drive up to 30A at 60V: https://www.adafruit.com/product/355
It has very low on resistance, and is fully turned on by a 5V CMOS logic output, and requires very little current through the base to turn it on.
As CrossRoads pointed out, if you're using an NPN or other BJT transistor you really need a current limiting resistor between the Arduino output and the gate so you don't draw too much current from the Arudino pin and fry it.
Note that regardless of what type of transistor you use, you need a "flyback diode" on the motor to protect the transistor from back EMF from the motor's inductive coils. Without a flyback diode you run the risk of destroying your transistor.