USB internal control to on/off a pc fan molex circuit
You could use an NPN transistor with the base connected to the 5V (by 1k resistor) coming from the USB, collector connected to the negative terminal of the fan and emitter connected to ground. This way whenever the usb gets power the fan will power on (providing 12v is present)

This configuration: