Olaparib, manufactured by pharmaceutical company AstraZeneca, could benefit hundreds who suffer from breast cancer and prostate cancer.
Men with advanced prostate cancer and women with a form of early breast cancer called HER2-negative will be able to access olaparib through NHS England if they are at high risk of the disease returning.
The newly-approved drug, given as a tablet, prevents cancerous cells from repairing their DNA - which causes them to die.
Also known as Lynparza, it targets cancers with BRCA 1 or BRCA 2 mutations, which are the genes most commonly affected in hereditary breast and ovarian cancer.
The treatment has been shown to reduce the risk of HER2-negative early breast cancer from returning within four years by nearly a third, NHS England said.
This is the first cancer drug in the world to target an inherited genetic fault.
It is estimated about 550 men with advanced prostate cancer, and 300 women with HER2-negative early breast cancer, will be eligible for the new drug in England each year.
Experts at the Institute of Cancer Research (ICR) described the decision as “life-changing” and say the medicine gives a chance for patients to live longer and healthier lives.
It was an “agonising” wait to receive a decision on whether to use the drug, Breast Cancer Now said, after a provisional rejection last November.
Prostate Cancer UK called it a “landmark moment” for prostate cancer treatment.