AbstractGraphitic carbon nitride/Barium hydroxide (g‐C3N4/Ba(OH)2) nanocomposites (NCs) are synthesized using chemical precipitation method. Scanning Electron Microscopic images revealed nanoneedle‐like formation of Ba(OH)2 in addition to g‐C3N4 nanosheets. MTT assay confirmed that g‐C3N4/Ba(OH)2 NC exhibited more anticancer activity against MCF‐7 breast cancer cell line, compared to pristine Ba(OH)2 NPs. The % cytotoxicity of Ba(OH)2 NPs, g‐C3N4 (5 mg/mL) @ Ba(OH)2 NCs, g‐C3N4 (10 mg/mL) @ Ba(OH)2 NCs and g‐C3N4 (20 mg/mL) @ Ba(OH)2 NCs against MCF‐7 cell line was found to be 0.79 %, 22.77 %, 6.97 and 9.44 % respectively at the lowest dose of concentration 2 μg mL−1 after 24 h. At 64 μg/mL concentration, the cell viability in pristine Ba(OH)2 NPs and g‐C3N4 (10 mg/mL) @ Ba(OH)2 NCs were found to be 25 % and 6.38 % respectively. The corresponding IC −50 values Ba(OH)2 NPs: 3.71 μg/mL; g‐C3N4 (5 mg/mL) @ Ba(OH)2 NCs: 3.60 μg/mL; g‐C3N4 (10 mg/mL) @ Ba(OH)2 NCs: 3.26 μg/mL; g‐C3N4 (20 mg/mL) @ Ba(OH)2 NCs: 4.04 μg/mL are observed. The mechanism behind the killing of tumor cells by the synthesized nanocomposites is through the generation of reactive oxygen species (ROS). The hydroxyl radicals formation in the solution treated with nanocomposites is confirmed through Terephthalic acid assay.