Quantum cascade lasers (QCLs) have broken the spectral barriers of semiconductor lasers and enabled a range of applications in the mid-infrared (MIR) and terahertz (THz) regimes. However, until recently, generating ultrashort and intense pulses from QCLs has been difficult. This would be useful to study ultrafast processes in MIR and THz using the targeted wavelength-by-design properties of QCLs. Since the first demonstration in 2009, mode-locking of QCLs has undergone considerable development in the past decade, which includes revealing the underlying mechanism of pulse formation, the development of an ultrafast THz detection technique, and the invention of novel pulse compression technology, etc. Here, we review the history and recent progress of ultrafast pulse generation from QCLs in both the THz and MIR regimes.