The enhanced self-Kerr nonlinearity of quantum dot molecules may be used to realize optical cavities with an ultranarrow linewidth and high gain. The resonant tunneling induces constructive interference for the self-Kerr nonlinearity, and then a narrow gain window with large normal dispersion appears with frequency detuning. The competition between linear and nonlinear dispersion leads to strong normal dispersion of the total susceptibility, which significantly narrows the cavity linewidth; the nonlinear gain introduces the total gain effects contributing to high transmission. Simulation results show that the cavity linewidth could be narrowed by nearly 30 times and the transmission peak enhanced about 40 times compared with a linear case.