Costa e Silva began his military career by entering the Military College of Porto Alegre, where he finished first of his class and commander of the cadet corps. He then entered the "Escola Militar de Realengo" in Rio de Janeiro in 1918, where he finished third of his class. Made an aspirant on January 18, 1921, he was commissioned 2nd Lieutenant in 1922 and was stationed with the 1st Infantry Regiment in Vila Militar until July 5, 1922, when he was involved in Tenentist rebellion and imprisoned for six months. He then married Iolanda Barbosa Costa e Silva, officer's daughter.