After the Second Partition of Poland, in 1793, it was annexed by Prussia. Regained by Poles in 1807, it was included in the short-lived Polish Duchy of Warsaw, in 1815 it was re-annexed by Prussia. The Poles took part both in the unsuccessful Greater Poland uprising of 1848 and the victorious Greater Poland uprising of 1918–1919, after which Kobylin was integrated with Poland, shortly after it regained independence. During World War II, Koźmin Wielkopolski was under German occupation from 6 September 1939 to 23 January 1945.