As you have it connected, no, that will not work. The NPN inside the optocoupler will try to draw current out of the base of your 2N2222, which is like trying to reduce the voltage on the base of the 2N2222, turning it off. What you need to do is remove the 2N2222A and replace it with the NPN transistor inside the optocoupler. Pin 16 is the collector and pin 15 is the emitter node, just delete the 2N2222A and replace it with the opto's output transistor.
Look over the spec sheet to see what your nominal voltage and current are for the input of the optocoupler, so that your MCU output voltage across 1k won't blow out the LED inside. Also, check the current handling capability of the output of the optocoupler, to ensure that it can sink enough current to energize the relay. You may need to use a second transistor to get additional current gain. If that is the case, I'd use a PNP to compliment the optocoupler's output.