John's family had a high position in the Muslim rulers of Damascus, and on the death of his father was made chief councillor of Damascus. Around this time, the burst of insurgence by the iconoclasts began to appear in the form of heresy, which disturbed the Church of the East. In 726, in disregard of the protests of Germanus, Patriarch of Constantinople, Emperor Leo the Isaurian issued his first edict against the veneration of images and their exhibition in public places. A talented writer and in the secure surroundings of the caliph's court, John de Damascene initiated his literary defense against the monarch in three Apologetic Treatises against those Decrying the Holy Images. This was the earliest of his works and the one which earned him a reputation.
Unable to punish the writer openly, Leo the Isaurian forged a letter from John to the Isaurian monarch offering to betray the city of Damascus. Despite John's plea of innocence, the caliph dismissed his plea and discharged him from his post, ordering his writing hand to be severed at the wrist. His hand was miraculously restored after fervent prayer before an icon of the Virgin Mary, and at this point the caliph was convinced of his innocence and wished to reinstate him to his former office. However, John then retired to the Monastery of Saint Sabbas near Jerusalem, where he continued to produce a stream of commentaries, hymns and apologetic writings, including the Oktoechos (the Church's service book of eight tones) and An Exact Exposition of the Orthodox Faith, a summary of the dogmatic writings of the Early Church Fathers.