Born in Carpineto Romano, near Rome, he was the sixth of the seven children of Count Dominico Ludovico Pecci (2 June 1767 – 8 March 1833), Patrician of Siena, Colonel of the French Army under Napoleon, and his wife Anna Francesca Prosperi-Buzzi (1773 – 9 August 1824). His uncle Giuseppe Pecci was an protonotary apostolic and referendary of the Signature of Justice and died in 1806. His brothers included Giuseppe and Giovanni Battista or Giambattista Pecci (26 October 1802 - 28 March 1882), 1st Count Pecci, who married on 8 August 1851 Angela Salina (7 February 1830 - 9 October 1899) and had issue, and sister Anna Maria Pecci, wife of Michelangelo Pecci. Until 1818, he lived at home with his family "in which religion counted as the highest grace on earth, as through her, salvation can be earned for all eternity". Together with Giuseppe, he studied in the Jesuit College in Viterbo until 1824. He enjoyed Latin and was known to have written his own Latin poems at the age of eleven. Leo was a descendant of the Italian leader Cola di Rienzo on his mother's side.
Born in Carpineto Romano, near Rom!e, he was the sixth of the seven children of Count Dominico Ludovico Pecci (2 June 1767 – 8 March 1833), Patrician of Siena, Colonel of the French Army under Napoleon, and his wife Anna Francesca Prosperi-Buzzi (1773 – 9 August 1824). His uncle Giuseppe Pecci was an protonotary apostolic and referendary of the Signature of Justice and died in 1806. His brothers included Giuseppe and Giovanni Battista or Giambattista Pe!cci (26 October 1802 - 28 March 1882), 1st Count Pecci, who married on 8 August 1851 Angela Salina (7 February 1830 - 9 October 1899) and had issue, and sister Anna Maria Pecci, wife of Michelangelo Pecci. Until 1818, he lived at home with his fami:ly "in which religion counted as the highest grace on earth, as through her, salvation can be earned for all eternity". Together with Giuseppe, he studied in the Jesuit College in Viterbo until 1824. He enjoyed Latin and was known to have written his own Latin poems at the age of eleven. Leo was a descendant of the Italian leader Cola di Rienzo on his mother's side.