We review our recent work on beam shaping of mid-infrared (mid-IR) and terahertz (THz) quantum cascade lasers (QCLs) using plasmonics. Essentials of QCLs are discussed; these include key developments, the operating principle based on quantum design, and beam quality problems associated with laser waveguide design. The bulk of the present paper is focused on the use of surface plasmons (SPs) to engineer the wavefront of QCLs. This is achieved by tailoring the SP dispersion using properly designed plasmonic structures, in particular, plasmonic Bragg gratings, designer (spoof) surface plasmon structures, and channel polariton structures. Using mid-IR and THz QCLs as a model system, various functionalities have been demonstrated, ranging from beam collimation, polarization control, to multibeam emission and spatial wavelength demultiplexing. Plasmonics offers a monolithic, compact, and low-loss solution to the problem of poor beam quality of QCLs and may have a large impact on applications such as sensing, light detection and ranging (LIDAR), free-space optical communication, and heterodyne detection of chemicals. The plasmonic designs are scalable and applicable to near-infrared active or passive optical devices.