As bishop of Bologna, he commanded the Guelph army of the Bolognese and their allies against the Ghibelline cities of lower Lombardy, roughly corresponding to present day Emilia-Romagna.
After Frederick's defeat at Parma on 18 February 1248, Ottaviano was ordered by Pope Innocent IV to recapture the papal possessions in the Po valley.
This mission proved difficult, however, as Ottaviano did not have enough money to pay an army - he thus sought help from local forces, but Guelphism in the Romagna was not yet sufficiently organised.
In 1251, following a seriously-damaging Florentine attack on the family castle at Montaccianico near Sant'Agata Mugello, Ottaviano decided to rebuild it bigger and stronger, with two curtain walls more than 3 meters (9.8 ft) thick in places, as shown by recent archaeological digs in the "Montaccianico Vive" project.
For this Dante Alighieri places Ottaviano in the Epicurean (i.e. atheist) circle of hell, alongside Farinata degli Uberti and Frederick II.