Although the answer is posted, I could explain why you messed up with the potentiometer
The little motor you're running, are using too much current for the potentiometer to handle. I'll explain.
The pot can handle 250VDC (Volts, Direct Current), which is plenty enough. Since you're running 9V (I guess DC), it's no problem.
The problem is the 0.25W limit. Look at it this way. A basic forumla in electronics world say that V*A = W ... if you put in your specs there, you'll get 9V * A = 0.25W, divide both sides with 9, and you'll get A = 0.25/9 = ~28mA.
Now. That means you can run an engine whích uses MAXIMUM 27mA at 9V (because of the potentiometer of course). If the engine doesn't have it printed, you could measure it up with a digital meter in serial with the engine and a battery/power supply.
I doubt the engine runs that cheap, hence, you're using too much power for the potentiometer to handle, and you get some smoke coming out from it.
Solution : get a more robust potentiometer (will cost you more and you have to measure just how robust you'll need) or build the clever schematics pebe posted (nice/better solution).
Hope you learned something... that's what we're here for.
//Albert "thec" Sandberg