At the age of fifteen he enlisted in a paramilitary organization called "Sursum Corda", training with one of the volunteer battalions in his free time during his studies.
Two years later, during the Great War, he falsified his identity documents (he was still seventeen) in order to enlist in the Royal Italian Army and join his father, who was already fighting at the front.
He thus joined the 5th Alpini Regiment, Edolo Battalion, fighting in Trentino and on the Asiago plateau; during a cadet officer course he met and befriended Aldo Resega.
On 12 February 1920, during a garrison service near Grokovo, Costa was captured by the Carabinieri and imprisoned for several months at the Brenner, due to his refusal to repudiate the Regency of Carnaro.
[8][9][10] In late April 1945, as the Italian Social Republic collapsed, Costa left Milan for Como, where thousands of soldiers and officials of the RSI had gathered; there he signed an agreement with the local National Liberation Committee and a representative of the Allies, stating that he would leave Como with his men and retreat to the Val d'Intelvi, in the mountains near the Swiss border, where he would wait for the arrival of the Allies in order to surrender to them.