Donne, whose family was Catholic, was born in time of anti-Catholic feelings in England. In the previous century, Henry VIII broke with the Catholic Church and set up an Anglican Church (Protestant) in England. When his daughter, Mary, ascended to the throne she brought Catholicism back to England, and persecuted Protestants (Anglicans) by burning them at the stake. The terrible suffering of the hundreds she put to death stayed in the minds of English people for a long time. After Mary's death, Elizabeth I came to power and reinstituted Protestantism. Consequently, Catholics were persecuted and discriminated against from this time. Donne's uncle and brother both died for their faith.
Catholics were not allowed to take degrees at Oxford or Cambridge, so Donne and his brother went to Oxford at the age of twelve so that they could get their education before they reached the age that they had to take an oath of allegiance to the Anglican Church.
After his university education, Donne trained for the law in London, but he was a very ambitious man and hoped to gain a high government job in diplomacy; however, his Catholicism prevented such a rise in his fortunes. Eventually Donne renounced Catholicism and accepted the Anglican Church. All of his life, he felt a certain guilt for this, but he did not change his faith purely for material reasons. The independence of thought encouraged by the Anglican Church attracted him, but spiritually and emotionally he remained Catholic in his heart.
As a young man, studying law at Lincoln's Inn, he wrote many sexy, provocative love poems. Many people treat these as autobiographical, but many of the poems were a vehicle for his cleverness. These poems were copied by friends and passed around London. Never published in his lifetime, they were published without permission from his family two years after his death.
Donne finally achieved a post that would have led to the kind of career he wanted but he ruined himself by eloping with his employer's ward, Ann, then sixteen years old. Ann's father was so angry that he had Donne thrown in jail for a while. He was released but his patron (boss) would not give him his job back. He wrote, "John Donne, Ann Donne, undone."
Ann -- dying at the age of thirty-three -- bore twelve children in fifteen years of married life which made it increasingly hard for Donne to support his family, but finally he made his way in the world and came to the attention of the king, James I, who impressed by Donne's verbal ability believed Donne would make an excellent clergyman. This was not the career Donne wanted but he finally resigned himself and joined the Anglican Church. Eventually, he became the Dean of St. Paul's Cathedral.