Why do my RC filter not work as I expect - Yet another fan project
With PWM, you have to drive the connection fully on, and fully off, each cycle.

When you have a filter/resistor on the base, you will effectively not be providing PWM to the transistor, but instead a linear control signal, and instead of being "fully on" or "fully off," the transistor will act as a voltage drop (a variable resistor) and thus dissipate a lot of heat. You're effectively building your own linear voltage regulator that way.

Other things:


MOSFETs are better than BJTs for PWM, because when "fully on" they lose little power, whereas BJTs lose more power the more "on" they are. use an N-channel MOSFET if you can. (The BS-170 can control up to 500 mA, so it would be sufficient in this case)
Plugging 5V out into the Vin of the Arduino is not a good idea, because there will be drop in the linear regulator of the Arduino, and the MCU will only see something less (possibly 4V or less) and be unstable. If you only have 5V, provide it to the +5V rail instead of the Vin pin.
The 488 Hz noise you're hearing is the PWM frequency. This is because the windings in the motor, and the whole mechanics of the motor, vibrates as power turns on/off. If you need to reduce this noise, you have to push the PWM frequency up to 20 kHz or more, where you can't hear it. To do that, you may need to use a MOSFET driver circuit to drive the gate of the MOSFET, as the 25 mA or so you get out of the Arduino may not switch the gate fast enough.