He married and had several children, but when his wife and children all died at nearly the same time, he took his loss as a call to forsake worldly cares, and committed his life entirely to God. In time he was consecrated Archbishop of Alexandria, where he became known for his zeal for the Orthodox faith and his struggles against the various heresies that prevailed in Egypt at that time. Most of all, though, he was known for the amazing purity of his generosity and compassion toward all.
On the day of his elevation to the Patriarchate, he ordered a careful census of his "masters," as he called the poor and beggars. It was found that there were 7,500 indigents in the city, and St. John ordered that all of them be clothed and fed every day out of the Church's wealth. In his prayers he would say "We will see, Lord, which of us will win this contest: You, who constantly give me good gifts, or I, who will never stop giving them away to the poor. For I have nothing that does not come to me by Thy mercy, which upholds my life."
His lack of judgment in giving to the poor sometimes dismayed those around him. Once a wily beggar came to John four times in four different disguises, receiving alms each time. When the holy Patriarch was told of this, he ordered that the man be given twice as much, saying "Perhaps he is Jesus my Savior, who has come on purpose to put me to the test." Still, the more generously he gave, the more generously God granted gifts to the Church, so that money was never lacking either for the poor or for the Church's own real needs. One of the clergy once gave only a third of what the Patriarch instructed to a rich man who had fallen into poverty, thinking that the Church's treasury could not afford to give so much. Saint John then revealed to him that a noblewoman who had planned to give an enormous gift to the Church had, shortly thereafter, given only a third of what she originally planned.
Once, when he was serving the Divine Liturgy at the Cathedral, the Patriarch stopped just before the consecration, instructed the deacon to repeat the litanies, and sent for one of his clergy who bore a grudge against him and would not come to church. When the man came, the Patriarch prostrated himself before him and, with tears, begged his forgiveness. When they were reconciled, he returned to the altar and proceeded with the service.
Though the Patriarch lived in a well-appointed palace befitting his rank, he owned no property and lived in a humble cell within the palace. A godly citizen, knowing his poverty, once gave him a fine blanket. The Saint immediately sold the blanket and gave the proceeds to the poor. The donor, however, found his gift for sale in a shop, bought it, and gave it again to the Patriarch. The Patriarch again sold it, and the donor again found it and gave it. The Synaxarion says, "As neither of them would give in, the bed-cover passed through their hands a good many times and was the means whereby John indirectly prevailed on the rich man to give away a great fortune to the poor."