Born in Telavi, the center of Kakheti region of Georgia, Heraclius was a son of Teimuraz II of Kakheti and his wife Tamar, daughter of Vakhtang VI of Kartli. His childhood and early teens coincided with the occupation of Kakheti by the Ottomans from 1732 until 1735, when they were ousted from Georgia by Nader Shah of Iran, in his two successive campaigns of 1734 and 1735, by which the latter quickly reestablished Persian rule over Georgia. Teimuraz sided with the Persians and was installed as a Persian vali (governor) in Kakheti, while Kilij Ali-Khan (Khanjal) was made that of neighboring Kartli. However, many Georgian nobles refused to accept the new regime and rose in rebellion in response to heavy tribute levied by Nader upon the Georgian provinces. Nonetheless, Teimuraz and Heraclius remained loyal to the shah, partly in order to prevent the comeback of the rival Mukhrani branch, whose fall early in the 1720s had opened the way to Teimuraz's accession in Kartli. From 1737 to 1739, Heraclius commanded a Georgian auxiliary force during Nader's expedition in India and gained a reputation of an able military commander. He then served as a lieutenant to his father and assumed the regency when Teimuraz was briefly summoned for consultations in the Persian capital of Isfahan in 1744. In the meantime, Heraclius defeated a coup attempt by the rival Georgian prince Abdullah Beg of the Mukhrani dynasty and helped Teimuraz suppress the aristocratic opposition to the Persian hegemony led by Givi Amilakhvari. As a reward, Nader granted the kingship of Kartli to Teimuraz and of Kakheti to Heraclius in 1744, and also arranged the marriage of his nephew Ali-Qoli Khan, who eventually would succeed him as Adil Shah, to Teimuraz's daughter Kethevan.