The basic idea of the circuit should work. You need to connect the sensor to the -ve input of the comparator and the 1.3 V reference to the +ve input. You haven't labeled the inputs.
However, there are a few details that are wrong. The comparator output should have a resistor between it and the transistor, or the inverter (NOT gate) will never see a large enough voltage to work.
There should be a resistor between base and emitter of the transistor so that it doesn't turn on with the leakage current. You should also have a diode across the motor to stop inductive spikes killing the transistor.
Also, I don't think that it is a good idea to kill the output of the comparator that way, and it is over-complicated. Opto-isolators are used where you need isolation and you don't need that here. You could just connect the output of the second inverter to supply the comparator and the sensor.
Even better would be to supply just the 1.3 V reference from the output of the comparator. There would be no need for the inverters or the opto-isolator. When the comparator turns off, the reference goes low, so the comparator, and the motor, stay turned off.