For a class $$\mathcal {G}$$ of graphs, the problem Subgraph Complement to $$\mathcal {G}$$ asks whether one can find a subset S of vertices of the input graph G such that complementing the subgraph induced by S in G results in a graph in $$\mathcal {G}$$ . We investigate the complexity of the problem when $$\mathcal {G}$$ is H-free for H being a complete graph, a star, a path, or a cycle. We obtain the following results: Further, we prove that these hard problems do not admit subexponential-time algorithms (algorithms running in time $$2^{o(\mid V(G)\mid )}$$ ), assuming the Exponential Time Hypothesis. We show that the complexity results on a graph class $$\mathcal {G}$$ is also true for the class $$\overline{\mathcal {G}}$$ of the complement graphs of $$\mathcal {G}$$ . Therefore, each of the above results mentioned for the H-free class of graphs is also valid for the $$\overline{H}$$ -free class of graphs. It is noteworthy that our results generalize two main results, namely, Subgraph Complement to triangle-free graphs and Subgraph Complement to d-degenerate graphs, and resolves one open question due to Fomin et al. (Algorithmica, 2020).