A theoretical model for calculation of the intrinsic linewidth of QCLs is built on the basis of the quantum Langevin approach. It differs from the traditional rate equation model in that the resonant tunneling and the dynamics of coherent interaction can be considered. Results show that the coupling strength and the dephasing rate associated with resonant tunneling strongly affect the linewidth of THz QCLs in the incoherent resonant-tunneling transport regime but only induce little influence in the coherent regime. The dynamics of coherent interaction and resonant-tunneling transport show insignificant effects on the linewidth calculation of mid-infrared QCLs due to strong coupling in resonant tunneling. We also demonstrate that by properly designing the active regions of QCLs, one can reduce the intrinsic linewidth according to our model.