Percy Bysshe Shelley was born August 4, 1792, at Field Place, near Horsham, Sussex, England. The eldest son of Timothy and Elizabeth Shelley, with one brother and four sisters, he stood in line to inherit not only his grandfather's considerable estate but also a seat in Parliament. He attended Eton College for six years beginning in 1804, and then went on to Oxford University. He began writing poetry while at Eton, but his first publication was a Gothic novel, Zastrozzi (1810), in which he voiced his own heretical and atheistic opinions through the villain Zastrozzi. That same year, Shelley and another student, Thomas Jefferson Hogg, published a pamphlet of burlesque verse, "Posthumous Fragments of Margaret Nicholson," and with his sister Elizabeth, Shelley published Original Poetry; by Victor and Cazire. In 1811, Shelley continued this prolific outpouring with more publications, including another pamphlet that he wrote and circulated with Hogg titled "The Necessity of Atheism," which got him expelled from Oxford after less than a year's enrollment. Shelley could have been reinstated if his father had intervened, but this would have required his disavowing the pamphlet and declaring himself Christian. Shelley refused, which led to a complete break between Shelley and his father. This left him in dire financial straits for the next two years, until he came of age.
That same year, at age nineteen, Shelley eloped to Scotland with sixteen-year-old Harriet Westbrook. Once married, Shelley moved to the Lake District of England to study and write. Two years later he published his first long serious work, Queen Mab: A Philosophical Poem. The poem emerged from Shelley's friendship with the British philosopher William Godwin, and it expressed Godwin's freethinking Socialist philosophy. Shelley also became enamored of Godwin and Mary Wollstonecraft's daughter, Mary, and in 1814 they eloped to Europe. After six weeks, out of money, they returned to England. In November 1814 Harriet Shelley bore a son, and in February 1815 Mary Godwin gave birth prematurely to a child who died two weeks later. The following January, Mary bore another son, named William after her father. In May the couple went to Lake Geneva, where Shelley spent a great deal of time with George Gordon, Lord Byron, sailing on Lake Geneva and discussing poetry and other topics, including ghosts and spirits, into the night. During one of these ghostly "seances," Byron proposed that each person present should write a ghost story. Mary's contribution to the contest became the novel Frankenstein. That same year, Shelley produced the verse allegory Alastor, or The Spirit of Solitude. In December 1816, Harriet Shelley apparently committed suicide. Three weeks after her body was recovered from a lake in a London park, Shelley and Mary Godwin officially were married. Shelley lost custody of his two children by Harriet because of his adherence to the notion of free love.
In 1817, Shelley produced Laon and Cythna, a long narrative poem that, because it contained references to incest as well as attacks on religion, was withdrawn after only a few copies were published. It was later edited and reissued as The Revolt of Islam (1818). At this time, he also wrote revolutionary political tracts signed "The Hermit of Marlow." Then, early in 1818, he and his new wife left England for the last time. During the remaining four years of his life, Shelley produced all his major works, including [what is generally considered his masterpiece] Prometheus Unbound (1820). Traveling and living in various Italian cities, the Shelleys were friendly with the British poet Leigh Hunt and his family as well as with Byron.
On July 8, 1822, shortly before his thirtieth birthday, Shelley was drowned in a storm while attempting to sail from Leghorn to La Spezia, Italy, in his schooner, the Don Juan.
I encourage you to read George Reiman’s biography on the Britannica site or the thorough biography on the Poetry Foundations site.