The Polish Military Organization (PMO) can be traced to formations of August 1914 or even earlier, but it was officially founded in November 1914, as a merger of two previously-existing youth para-military organisations: the Drużyny Strzeleckie and the Związek Strzelecki. Active in the Russian-held Kingdom of Poland, the PMO served as the intelligence and sabotage arm of Piłsudski's Polish Legions. In fact, many members of the illegal and secret PMO were at the same time soldiers of the Austrian-backed Polish Legions. The PMO was commanded militarily by Piłsudski himself, while the political command was a secret "A" Convent headed by Jędrzej Moraczewski.
Initially active only in Central Poland, with time the PMO units were formed in all parts of the former Polish-Lithuanian Commonwealth, including modern day Lithuania, Belarus, Ukraine and Russia. It was mainly preoccupied with intelligence and sabotage, as well as military training of its members and acquisition of arms from various armies fighting on Polish soil. The PMO members were seen as the core of the future Polish Army after Poland regained her independence.
After most of Poland was occupied by the Central Powers in 1915, the PMO became semi-legal and unofficially supported by the German army, which saw it as a useful source of information on Russia and a useful reservoir of skilled officers. However, in July 1917, after the Oath Crisis in the Polish Legions and the arrest of Piłsudski, the PMO returned to the underground and started covert operations against German and Austrian garrisons and supply lines. In place of Piłsudski, who was sent to a German prison in the fortress in Magdeburg, the commander of the PMO became his friend, Edward Rydz-Śmigły, also future Marshal of Poland.
With the collapse of the Central Powers during the final stages of the Great War, the PMO command decided to take an active part in the war and the organisation went out in the open. In October and November 1918 the revolutions in Germany and Austria-Hungary made the Ober Ost army collapse. The German units were struck by mass desertions of soldiers who simply left their posts and headed for their homes. The main tasks of the PMO during this period was to disarm the withdrawing soldiers and escort them to Germany. The campaign was successful and gave the new-born Polish state a large quantity of arms and military equipment. By mid-November, most of garrisons in Galicia surrendered to PMO members and the region became controlled by Poland. The PMO members continued the disarming actions in the former Congress Kingdom as well. Finally, the PMO was the core of Polish defences of the city of Lwów in the Battle of Lwów against the attacking forces of the West Ukrainian People's Republic (roughly 400 members in the initial phase of the struggle). In December 1918, the members of the PMO were all conscripted into the newly-reborn Polish Army.
Contrary to the rest of units, the PMO in the Ukraine (most notably the areas controlled by both the Western Ukrainian government and the areas controlled by the Kiev-based Directorate and Hetmanate) remained active after the Polish withdrawal from Kiev in July 1920.