He joined the Roman army and rose through the ranks during the reign of Theodosius I, who ruled the Eastern half of the Roman Empire from Constantinople, and who was to become the last emperor to rule both the Eastern and Western halves of the Empire jointly. In 384, Theodosius sent him as an envoy to the court of the Persian king Shapur III to negotiate a peace settlement relating to the partition of Armenia. Upon his return to Constantinople at the successful conclusion of peace talks, Stilicho was promoted to general and was tasked with defending the empire against attacks from the Visigoths, a role that he undertook for some twenty years. The emperor recognized that Stilicho could be a valuable ally, and to form a blood tie with him, Theodosius married his adopted niece Serena to Stilicho. The marriage took place around the time of Stilicho's mission to Persia, and ultimately Serena gave birth to a son, who was named Eucherius, and two daughters, Maria and Thermantia.
After the assassination of the Western Emperor Valentinian II in 392, Stilicho helped raise the army that Theodosius would lead to victory at the Battle of the Frigidus, and was one of the Eastern leaders in that battle. One of his comrades during the campaign was the Visigothic warlord Alaric, who commanded a substantial number of Gothic auxiliaries. Alaric would go on to become Stilicho's chief adversary during his later career as the head of the Western Roman armies . Stilicho distinguished himself at the Frigidus, and Theodosius, exhausted by the campaign, saw him as a man worthy of responsibility for the future safety of the Empire. The last emperor of a united Rome appointed Stilicho guardian of his son, Honorius shortly before his death in 395.
Following the death of Theodosius, Honorius became emperor of the Western Empire, and his brother Arcadius of the Eastern half. Neither proved to be effective emperors, and Stilicho came to be the de facto commander-in-chief of the Roman armies in the West. In this capacity, Stilicho proved his abilities energetically, although political manoeuverings by agents of the two imperial courts would hinder him throughout his career.
His first brush with such court politics came in 395. The Visigoths living near the Danube were under pressure from the Huns, and had recently elected Alaric as their king. Alaric broke his treaty with Rome and led his people on a raid into Thrace. The army that had been victorious at the Frigidus was still assembled, and Stilicho led it toward Alaric's forces. As this army, a combination of formations from both halves of the empire, marched into the Eastern Empire, Arcadius recalled the Eastern formations to Constantinople. Arcadius was acting on advice from his Praetorian Prefect, Rufinus, who was an old enemy of Stilicho. Stilicho obeyed the order and sent off his Eastern troops, leaving him too weak to effectively move against Alaric. Rufinus gained little from his victory over Stilicho, as the returning troops killed him upon their arrival in Constantinople.
Two years later, in 397, Stilicho defeated Alaric's forces in Macedonia, although Alaric himself escaped into the surrounding mountains. The same year saw him successfully quell the revolt of comes Gildo in Africa. Subsequently he was deployed to Rhaetia in 401, where he led an extensive campaign against his former kinsmen, the Vandals, and other barbarian marauders. Stilicho would also fight two more major battles against Alaric, at Pollentia in 402 and Verona in 403. In 405, he ordered the destruction of the Sibylline Books, because Sibylline prophesies were being used to attack his government.
Without a strong general like Stilicho to control the by-now mostly barbarian army, Honorius could do little to break the siege, and adopted a passive strategy trying to wait out Alaric, hoping to regather his forces to defeat the Visigoths in the meantime. What followed was two years of political and military manoeuvering, Alaric, king of the goths, attempting to secure a permanent peace treaty and rights to settle within Roman territory. He besieged Rome three times without attacking while the Roman Italian Army watched helplessly, but it was not until the deal had fallen through a fourth time that he attacked and sacked the city in August 410. The removal of Stilicho was the main catalyst leading to this monumental event, the first barbarian capture of the city in nearly eight centuries and a presage of the final collapse of the imperial west.