For over a decade now, the primary purpose of relativistic heavy-ion collisions at the Relativistic Heavy-Ion Collider (RHIC) and the Large Hadron Collider (LHC) has been to study the properties of QCD matter under extreme conditions—high temperature and high density. The heavy-ion experiments at both RHIC and LHC have recorded a wealth of data in p+p, p+Pb, d+Au, Cu+Cu, Cu+Au, Au+Au, Pb+Pb, and U+U collisions at energies ranging fromsNN=7.7 GeV to 7 TeV. Heavy quarks are considered good probe to study the QCD matter created in relativistic collisions due to their very large mass and other unique properties. A precise measurement of various properties of heavy-flavor hadrons provides an insight into the fundamental properties of the hot and dense medium created in these nucleus-nucleus collisions, such as transport coefficient and thermalization and hadronization mechanisms. The main focus of this paper is to present a review on the measurements of azimuthal anisotropy of heavy-flavor hadrons and to outline the scientific opportunities in this sector due to future detector upgrade. We will mainly discuss the elliptic flow of open charmed meson (D-meson),J/ψ, and leptons from heavy-flavor decay at RHIC and LHC energy.