Wallenius was a member of the Finnish Jäger troops trained in Germany prior to Finnish independence. In 1915 Wallenius travelled to Germany where he enrolled in the Royal Prussian 27th Jäger Battalion. He took part in the battles on the Misse River.
After returning to Finland, Wallenius took part in the Finnish Civil War of 1918 on the side of the anti-Communist Whites. He commanded a platoon in Tervola and Tornio. In Lapland Wallenius met reindeer herder Aleksi Hihnavaara, with whom he travelled around Lapland, and the two became good friends. Wallenius was later appointed commander of the troops around Kuolajärvi and Kuusamo. Here he was given the command of the northern group in the failed March 1918 Viena expedition, which tried to annex parts of East Karelia to Finland.
After the Civil War Wallenius commanded troops in North-Western Finland: the Salla Regiment and the 1st Border Guard Regiment of Lapland. In the 1920s he was briefly made a military attaché in Berlin.
In 1930 Wallenius was promoted to the rank of Major General. However, he was forced to retire in that year when he was implicated in the kidnapping of the former Finnish President Kaarlo Ståhlberg, though Wallenius was eventually acquitted of all charges. In the 1930s Wallenius became involved in right-wing activities, becoming the secretary-general of the Lapua movement. In this capacity he was involved in the so-called Mäntsälä rebellion. Wallenius was imprisoned twice for a total of over one year.
In the Winter War Wallenius commanded Finnish troops in Lapland. When the Winter War began, the Commander-in-Chief of Finnish troops Mannerheim appointed Wallenius as the commander of the Lapland Group. The troops under his command, though outnumbered, repulsed Soviet troops at Salla and Petsamo. Once the front in Lapland had stabilized, Wallenius handed the command over to Swedish volunteers under Lieutenant General Ernst Linder in February 1940. Wallenius and most of his troops were sent to the southernmost point of the front to western shore of the Bay of Viipuri, where the Red Army had crossed the frozen gulf. Wallenius protested this new assignment, thinking he was being punished for his past sins. The situation was critical and terrain totally different from what Wallenius and his men were used to. Wallenius failed to prevent the Red Army from gaining a foothold from the western shore of the bay, and there were reports that he was drinking heavily. Wallenius was dishonorably discharged in early March 1940, after only three days in command, and replaced by Lieutenant General Karl Lennart Oesch. Wallenius was removed from the Defence Forces officer lists.