Following his studies, Mahdavi became an assistant professor at
Georgetown University as part of the McCourt School of Public Policy. He published the
"Oil and Gas Data, 1932–2014" dataset in the same year, which was co-authored by Michael L. Ross. Hosted on
Harvard Dataverse it provides a global time-series record of oil and natural gas production, prices, exports, and net exports from 1932 through 2014. Beginning in 2016, Mahdavi served as a Global Future Council Fellow with the
World Economic Forum's Council on the Future of Energy. He remained in the position until 2018, with the council providing strategic insight and recommendations on the transformation of global energy systems during that period. While at Georgetown, he published the Global Progress and Backsliding on Gasoline Taxes and Subsidies paper in
Nature Energy. Mahdavi left his position at
Georgetown University in 2018, to become assistant professor of Political Science at
UC Santa Barbara. He published "Institutions and the ‘Resource Curse’: Evidence From Cases of Oil-Related Bribery" in
Comparative Political Studies in 2019. It studied the nuances of why some oil-rich countries face major corruption while others don't. In 2020, Mahdavi released his first full-length
monograph about the political stances of resource nationalization with
Cambridge University Press titled,
Power Grab: Political Survival through Extractive Resource Nationalization. Power Grab studies how vulnerable authoritarian leaders use
oil nationalization as a political tool to remain in power, and how the theory can apply to other countries with resources other than oil. A review in
War on the Rocks praises Mahdavi's analysis, backed with
"rigorous qualitative and quantitative evidence." Mahdavi has provided commentary on oil politics and climate change to media outlets such as the
BBC, CBS, the Guardian, and NPR. Mahdavi became an associate professor at UCSB in 2022. In the same year
The Journal of Politics published Mahdavi's article titled "Why Do Governments Tax or Subsidize Fossil Fuels?" The article examined why governments adopt polar opposite policies toward
fossil fuels depending on a country's specific economic and political circumstances. Mahdavi demonstrated that there is a correlation between the level of revenue governments receive from oil and gas production and whether they choose to impose higher or lower rates of fossil fuel tax. In 2025, Mahdavi wrote an op-ed in the
Santa Barbara Independent, discussing the climate and environmental impacts of reopening the Sable Offshore pipeline. This was before politicians in Washington had indicated the pipeline was due to reopen, which had been closed since the
Refugio oil spill in 2015. ==2035 Initiative==