At the same time, its £3.5 billion endowment fund will "ramp up" investments in renewable energy.
Vice-chanceller Prof Stephen J Toope said there was an "environmental and moral need for action" to find "solutions to the climate crisis".
The student-led Cambridge Zero Carbon Campaign said it was "a historic victory for the divestment movement".
The disinvestment is part of the university's plans to cut its greenhouse gas emissions to zero by 2038, more than a decade before the date set by the UK government.
A Cambridge Zero Carbon Campaign spokeswoman said the announcement "comes five years too late and we'll be pushing for the 2030 commitment to be brought forward".
It will continue to campaign for the university to "end all its ties" to the fossil fuel industry, she added.
The university plans to withdraw investments with conventional energy-focused public equity managers by December 2020, build up significant investments in renewable energy by 2025 and divest from all meaningful exposure in fossil fuels by 2030.
Chief investment officer Tilly Franklin said: "Climate change, ecological destruction, and biodiversity loss present an urgent existential threat, with severe risks to humankind and all other life on Earth.
"The investment office has responded to those threats by pursuing a strategy that aims to support and encourage the global transition to a carbon-neutral economy."
The university added all future research funding and donations will need to demonstrate compatibility with its greenhouse gas emissions-cutting objective to be accepted.
In 2019, it commissioned a report into the advantages and disadvantages of the divestment.
Cambridge Zero Carbon Society has campaigned against the university's fossil fuel investments for five years, including a a week-long sit-in in 2018.
Original article: https://www.bbc.com/news/uk-england-cambridgeshire-54373774