Ryś-Trojanowski was born in a patriotic Polish family: his father Szymon fought in the January Uprising. After high school, Mieczyslaw went to Kraków, to study at Jagiellonian University. There he got in touch with patriotic organizations, which fought for the independence of the nation (see Partitions of Poland). Rys-Trojanowski participated in the Revolution of 1905, during which he was arrested on suspicion of attempting to kill Russian governor of Warsaw (see Congress Poland). In 1908 he moved to Austrian Galicia, where he became one of key members of the Union of Active Struggle, and organizer of local branches of the Riflemen's Association.
In early November 1918, Ryś-Trojanowski became commandant of Chełm Military District and Chełm Infantry Regiment (later renamed into 35th Infantry Regiment), with which he fought in the Polish–Soviet War. On May 20, 1920, Ryś-Trojanowski was transferred to the 17th Infantry Brigade, and on September 2 of that year he was named commandant of the 9th Infantry Division, remaining in this post until late July 1926.
Rys-Trojanowski remained in this post until the Invasion of Poland (September 1, 1939). On September 4 he left Polish capital, tasked with creation of Prusy Army. Due to rapid German advance, this army was not created: Rys-Trojanowski involved himself with creation of Warszawa Army. He personally visited checkpoints on roads east of Warsaw, controlling the evacuation of civil servants, police officers and army personnel.
In mid-September, he helped with creation of Lublin Army, gathering soldiers scattered in northern Lesser Poland, Podlasie and eastern Mazovia. On September 20, after Soviet invasion of Poland, Rys-Trojanowski fled to Hungary, where he remained until March 1944. He was a very active member of Polish organizations in Hungary, cooperating both with Home Army and Hungarian headquarters.