Contemporary politics deeply influenced Dante's literary and emotional life, and had a major influence on the writing of the Inferno. Renaissance Florence was a thriving, but not a peaceful city: different opposing factions continually struggled for dominance there. The Guelfs and the Ghibellines were the two major factions, and in fact that division was important in all of Italy and other countries as well. The Pope and the Holy Roman Emperor were political rivals for much of this time period, and in general the Guelfs were in favor of the Pope, while the Ghibellines supported Imperial power. By 1289 in the battle of Campaldino the Ghibellines largely disappeared from Florence. Peace, however, did not insue. Instead, the Guelf party divided between the Whites and the Blacks (Dante was a White Guelf). The Whites were more opposed to Papal power than the Blacks, and tended to favor the emperor, so in fact the preoccupations of the White Guelfs were much like those of the defeated Ghibellines. In this divisive atmosphere Dante rose to a position of leadership. in 1302, while he was in Rome on a diplomatic mission to the Pope, the Blacks in Florence seized power with the help of the French (and pro-Pope) Charles of Valois. The Blacks exiled Dante, confiscating his goods and condemning him to be burned if he should return to Florence. Dante never returned to Florence. He wandered from city to city, depending on noble patrons there. Between 1302 and 1304 some attempts were made by the exiled Whites to retrieve their position in Florence, but none of these succeeded and Dante contented himself with hoping for the appearance of a new powerful Holy Roman Emperor who would unite the country and banish strife. Henry VII was elected Emperor in 1308, and indeed laid seige to Florence in 1312, but was defeated, and he died a year later, destroying Dante's hopes. Dante passed from court to court, writing passionate political and moral epistles and finishing his Divine Comedy, which contains the Inferno, Purgatorio, and Paradiso.
The Inferno can therefore be read as a piece of propaganda against Dante's enemies (the Pope, the Black Guelphs). Although this may be more applicable to the other two parts of the Divine Comedy, the Inferno is also a mystical religious poem. However, the political side of it is much more prominent. In any case, many of the concerns raised in the Inferno are widely applicable to Renaissance Italy: factionalism, violence, the volatile mixture of mystic Christianity and hardheaded mercantile activity, conflict with other cultures, aristocratic notions of honor and revenge, the combination of Chuch and State...
The Inferno was of course written before the invention of the printing press, and was probably not widely read ? of course, at that time, very little could be said to be widely read, given literacy rates and lack of printed materials. Copyrights also did not exist, so we can discount the idea that Dante was writing to appeal to a large audience. He depended on aristocratic patrons, but the Inferno does not seem to have been written with patronage in mind either: there are few or no glowing references to Lord such-and-such's benevolence, as appear in many pre-copyright books. Probably Dante wrote the Inferno largely to gratify himself, to denounce his enemies and gain a certain amount of revenge. But also we cannot doubt that Dante wanted very much to be acclaimed as a poet. In Hell, he often offers to tell people on earth about the damned souls, so that their memories will not be forgotten: fame was a very important thing for Dante. The Divine Comedy was his master-piece, the work that would finally give him his place with Virgil and Homer.