He fought in various formations on the Belarusian and Romanian fronts as an officer of the Engineering and Signal Corps, and in December 1918 he was allowed to join the Polish unit formed under command of Gen. Lucjan Żeligowski out of Poles living in Russia.
A polyglot and amateur cryptologist, Kowalewski was initially attached to the staff of Gen. Józef Haller, fighting in Volhynia and Eastern Lesser Poland during the Polish-Ukrainian War for the city of Lwów.
Initially based at Figueira da Foz, he soon moved to Lisbon, then a center of espionage and battleground for spies of all countries involved in World War II.
Officially named the Center for Contact with the Continent (Placówka Łączności z Kontynentem), the Lisbon-based bureau was headed by Kowalewski and soon became the hub of an extensive net of Polish resistance, sabotage and intelligence organizations throughout occupied Europe.
Kowalewski's intelligence network was also helpful to the British government, as most of his reports were passed either to SOE or to the Ministry of Economic Warfare.
A notable coup for his Lisbon center was the passing of the exact date for Operation Barbarossa to the British, who were thus informed of the fact at least two weeks prior to the actual invasion of Russia.
The situation further deteriorated after the Tehran Conference, when it became clear that Hungary and Romania would fall under Soviet domination anyway and that the plan for a second front in the Balkans, which would allow the Hungarians and Romanians to break with Nazi Germany was finally dismissed.
According to recent research by a Polish-British joint history commission for investigation of Polish World War II intelligence service, at the latter conference the Soviets demanded that Kowalewski be withdrawn from his post to England.
Although no proofs were presented, the Polish government felt forced to obey the British wish and Kowalewski was dismissed from his post on March 20 and on April 5 he was transported to London.
In his late years, in 1963, he briefly returned to cryptanalysis and managed to break the codes used by Romuald Traugutt during the January Uprising.