How to connect Dc motor to Diode transistor logic
Remove the ground connection on the output.
Connect the motor between ++ and output. 


See how to use an npn as a switch between battery and motor?.

How it works:


With A and B disconnected or high the left 1k resistor (you should number your components) feeds current into the base of the transistor. This turns it on and connects the collector (output) to GND.
If either A or B is pulled low (to GND or 0 V) the base current is diverted away from the transistor base and the motor will turn off.


You don't need the resistor on the right if you connect the motor. It's resistance will do the same thing.