Objectives: Introduction to new numerical techniques to solve differential, difference, and integro-differential equations (IDEs) are always remaining the thrust area of research for many scientists over the centuries. The prime objective of this work is to contribute a new numerical technique to solve IDEs. Method: To address non-linear integro-differential equations, we computed an operational matrix of derivatives based on the Hosoya polynomial of the path graph in this work. Findings: Using the derived operational matrix, we have solved both Volterra and Fredholm integrodifferential equations. Taking suitable examples accuracy of the projected method is demonstrated in this paper in terms of a graphical representation of the absolute error. The results of the examples reveal that the projected method is a suitable method to solve IDEs. Novelty: The application of the Hosoya polynomial of path graph to solve integro-differential equations is a novel approach in the field of numerical analysis.