A novel scheme of microwave generation based on heterodyne phase locking of an optoelectronic oscillator (OEO) is proposed and demonstrated. The oscillation signal of a dual loop self-injection-locking OEO (DSILOEO) is mixed with a voltage controlled crystal oscillator (VCXO) and its up-converted output is phase-locked by a reference source to develop a heterodyne phase-locked-loop. The DSILOEO has suppressed phase noise while its frequency fluctuation is cancelled out by the VCXO so that low phase noise and excellent long-term stability can be realized independently for microwave generation, which greatly increases the design flexibility. The experimental results show that the phase noise at 10-kHz offset carrier of −122 dBc/Hz and the Allan deviation of $1.6 \times 10^{{-12}}$ are achieved.