The present invention provides a use of a PARP inhibitor in treating a chemotherapy-resistant ovarian cancer or breast cancer. In particular, the present invention provides a use of a PARP inhibitor in preparing a drug for treating a chemotherapy-resistant ovarian cancer or breast cancer. The PARP inhibitor is selected from a compound as shown in general formula (B) and a pharmaceutically acceptable salt thereof.