His father was named Sforza Marescotti and his mother was Vittoria Ruspoli, both born to prominent aristocratic families of Bologna and Modena.
Galeazzo studied in seminary, and after ordination by the age of 23 years was appointed to the papal office of prothonotary apostolic.
[2] On 13 August 1670 he was appointed apostolic nuncio in Spain by Pope Clement X, and remained at that post in Madrid till 1675.
Pope Clement X elevated him to the rank of cardinal in the consistory of 27 May 1675, and assigned him the title of San Bernardo alle Terme.
In the Cathedral of San Lorenzo, he built for the canons at his own expense a finely worked walnut wood choir and adorned a chapel with colored marble and other ornaments.