We know little for certain about the life of Publius Vergilius Maro, to give Virgil his full Latin name. We know much more about what was going on in the world during his life, and about the most important books he wrote. He was born in 70 BC, during the last years of the Roman Republic. Rome had extended its power around the Mediterranean, but it had not developed a form of government that could rule so much territory justly and effectively while maintaining a true republic. The generals who made conquests for Rome gained more and more power, and they strove with each other for power. The highly effective general Julius Caesar crossed the Rubicon to seize power in Italy in 49 BC, when Virgil was 21, and was assassinated in 44 BC. His adopted heir, Octavian, having finally defeated all other claimants to power, took the name of Augustus Caesar in AD 27 and ruled, as First Citizen and restorer of the Republic, until AD 14.
Roman citizenship had not been extended to the north of Italy when Virgil was born there, near the city of Mantua. The author of the great epic on the founding of the Roman people was an Italian before he was a Roman; Julius Caesar extended Roman citizenship to the area only in AD 49. And the last six books of the Aeneid celebrate all the Italian tribes, including those who fought against Aeneas. Virgil's father was probably a small farmer, a higher and more respected position then than now, and he gave his son, who was drawn to the study of literature and philosophy, a full education.
Whether Virgil and his father lost or kept their farms when Octavian confiscated land in their area to give to his veterans in AD 42 is not clear. What is clear is that at some point Virgil came to the attention of Maecenas, who played an important role in giving patronage himself and in directing the patronage of Augustus to the poets of the period, so important that we still refer to a generous patron of art and literature as a Maecenas. The friendship of Maecenas meant that Virgil had all the money and leisure he needed to write, as well as the society of the other good poets of the time, as he strove to create works of literature in Latin that would equal the masterpieces of Greek literature, as well as speak to the need of his own times for peace and a renewal of ancient values.
Virgil's first important poems, pastoral poems influenced by the Greek Theocritus yet alluding to the great questions of the day, were published together as the Eclogues in 39 or 38 BC. Then, in 29 BC, came his Georgics, often seen as the most perfect of his works, in which he celebrated the farming life and its values. And then he dedicated himself wholly to the creation of an epic in Latin to match the work of Homer. He suggested in his Georgics that his epic would celebrate the martial glories of Augustus, but in the end he created a far greater work, one that warned as well as celebrated, and put the achievement of Augustus in a much larger perspective than anything directly about his victories could have done.
Virgil finished a first draft of the poem, and even read the second, fourth, and sixth books aloud to Augustus and his sister Octavia. He was known as a masterful reader, and so moving were the lines in which he lamented the death of Octavia's son Marcellus, we are told, that Octavia fainted. Then Virgil wanted three years to revise his poem. Dying of fever at the age of 51 (in 19 BC), before he could do that revision, he charged his executors to destroy the poem, but Augustus forbade that destruction, and the poem became a school text almost immediately.
We are told that Virgil was a shy, almost reclusive man, kind and generous to other poets, unwilling to quarrel with anyone, a man of great integrity. He never married. He is reported as having fallen in love with a beautiful young man, but his biographer compares that love to the love of Socrates for Alcibiades-chaste, and wanting only the young man's good.