The ancient prayer dates to the 4th century and originated with a Desert Father.
While the “Angel of God” prayer is one of the most popular prayers to the angels, it is not the oldest. There exists a prayer composed by St. Macarius of Egypt that is one of the oldest known prayers to a Guardian Angel.
St. Macarius was born around the year 300 and at first pursued the vocation of marriage. However, his wife died shortly after the wedding, and her death was followed by that of his parents. Feeling the call of Christ to give up everything on this earth, Macarius distributed his goods to the poor and embraced the ascetic life. He dedicated his life to prayer and was eventually ordained a priest.
After being falsely accused of fathering an illegitimate child, Macarius fled to the desert of Egypt and encountered St. Anthony the Great. Macarius stayed to learn from him the ways of the monastic life and then moved to the desert of Scetes and built a monastery. Thousands of monks came to learn from the wisdom of Macarius, and he is regarded as one of the great Desert Fathers. He died in 391 after spending decades in the desert, leading a devout life of prayer, fasting, and asceticism.
Here is the prayer that he composed to his Guardian Angel.
Holy angel, to whose care this poor soul and wretched body of mine have been given, do not cast me off because I am a sinner, do not hold aloof from me because I am not clean. Do not yield your place to the Spirit of Evil; guide me by your influence on my mortal body. Take my limp hand and bring me to the path that leads to salvation.
Yes, holy angel, God has given you charge of my miserable little soul and body. Forgive every deed of mine that has ever offended you at any time in my life; forgive the sins I have committed today. Protect me during the coming night and keep me safe from the machinations and contrivances of the Enemy, that I may not sin and arouse God’s anger.
Intercede for me with the Lord; ask him to make me fear him more and more, and to enable me to give him the service his goodness deserves. Amen.