One of the event shape observables, the transverse spherocity (S0), has been studied successfully in small collision systems such as proton-proton collisions at the LHC as a tool to separate jetty and isotropic events. It has a unique capability to distinguish events based on their geometrical shapes. In this work, we report the first implementation of transverse spherocity in heavy-ion collisions using a multi-phase transport model (AMPT). We have performed an extensive study of azimuthal anisotropy of charged particles produced in heavy-ion collisions as a function of transverse spherocity (S0). We have followed the two-particle correlation (2PC) method to estimate the elliptic flow (v2) in different centrality classes in Pb-Pb collisions at sNN = 5.02 TeV for high-S0, S0-integrated and low-S0 events. We found that transverse spherocity successfully differentiates heavy-ion collisions event topology based on their geometrical shapes, i.e., high and low values of spherocity. The high-S0 events have nearly zero elliptic flow, while the low-S0 events contribute significantly to the elliptic flow of spherocity-integrated events.