 Barnaba Niccolò Maria Luigi Chiaramonti was born in Cesena in 1742, the youngest son of Count Scipione Chiaramonti (30 April 1698 - 13 September 1750).His mother, Giovanna Coronata (d. 22 November 1777), was the daughter of the Marquess Ghini; through her, the future Pope Pius VII was related to the Braschi family of Pope Pius VI after marriage on 10 November 1713.Though his family was of noble status, they were not wealthy but rather, were of middle-class stock.