Pembrolizumab (MK-3475) is a potent and highly selective humanized monoclonal antibody of the immunoglobulin G4κ class directed against the immune checkpoint programmed cell death protein-1 (PD-1). Binding to PD-1 prevents its interaction with natural ligands and allows for the reactivation of the immune response against cancer cells. The list of approved indications of pembrolizumab is fast expanding, including its use as first-line treatment of metastatic non–small cell lung cancer (NSCLC), which is a complex and evolving disease. Pharmacogenomics significantly contributed to understanding this complexity, allowing for the identification of molecular biomarkers and novel pharmacologic targets. This approach has delivered more effective and less toxic drugs for advanced NSCLC. In our opinion, pharmacogenomics played a key role in the approval of pembrolizumab as frontline therapy for NSCLC with high expression of the PD-1 ligand, which occurs in ∼30% of patients. Moreover, an analysis conducted on the ongoing clinical trials sponsored by the drug's patent holder shows that the characterization and validation of additional pharmacogenomic biomarkers of response has the potential to extend the frontline clinical use of pembrolizumab in NSCLC.