A Barracks emperor (also called a "soldier emperor") was a Roman Emperor who seized power by virtue of his command of the army. Barracks emperors were especially common in the period from 235 through 284, during the Crisis of the Third Century. There were approximately fourteen barracks emperors in 33 years, producing an average reign of a little over two years apiece. The resulting instability in the imperial office and the near constant state of civil war and insurrection threatened to destroy the Roman Empire from within and left it vulnerable to attack from beyond.

Unlike previous emperors who had seized power in military coups d'état (Vespasian and Septimius Severus, both from traditional middle-class Equestrian stock), the barracks emperors tended to be low-class commoners (often from outlying parts of the empire); the first barracks emperor, Maximinus Thrax, had begun his military career as an enlisted soldier. A barracks emperor could not boast of a distinguished family name or a successful career as a statesman or public servant; rather, he had only his military career to recommend himself, and his only influence was the points of his soldiers' swords.

Some of these soldier emperors were members of the equestrian class who had worked their way up to a sufficient position of influence within their legion that the soldiers would support a bid for the purple, although this was a risky undertaking because the soldiers could withdraw their support at any time and perhaps shift it to another military leader who looked more promising at the time.

Because the barracks emperors were frequently border commanders, the act of overthrowing the reigning emperor and seizing power for themselves left large gaps in the empire's border defenses, gaps that could be exploited by the Romans' enemies, leading to the Germanic incursion into Roman territory in the 260s and resulting in the construction of the Aurelian Walls around Rome. The barracks emperors also used state money to pay their troops — no emperor who had come into power by force of arms could afford to allow his soldiers to become disaffected, as those who live by the sword die by the sword — and public works and infrastructure fell into ruin. To accommodate the vast demands of buying off their soldiers, the state often simply seized private property, damaging the economy and driving up inflation.

The imperial system was on the verge of total collapse in 284 when yet another barracks emperor, a cavalry commander named Diocletian, seized power and donned the purple. Diocletian instituted a number of reforms designed to stabilize the empire and the imperial office, including a collegial system of emperors called the Tetrarchy, bringing an end to the Third Century Crisis and inaugurating the Dominate era of Roman history.

Grandson of Gordian I - elected by Senate at 13. Either killed in battle against Persians under Shapur I in modern-day Iraq (Roman histories do not mention the battle) or murdered by the Praetorian Prefect Philip, who succeeded him as Philip the Arab

Governor of Moesia Superior and Pannonia who defeated a Gothic army and was proclaimed emperor by his soldiers. Murdered by his own soldiers when they saw that they could not defeat the army of Valerian, who came to avenge Trebonianus Gallus

When the notion of a barracks emperor is extended to any emperor that was appointed by the army, more emperors whose reign predates the 3rd century can be included:

The first known emperor that was appointed by the Praetorian Guards after the murder of Caligula, was Claudius.

A notable case took place after the murder of emperor Pertinax. Praetorian Guards had come to the point when they simply sold the throne off, by auctioning it to the highest bidder, selling it to one of the richest Romans at the time, Didius Julianus.