It was the first locomotive designed in Poland after World War I, so the design work was done jointly with Hanomag, based on the Prussian P 8 (PKP class Ok1) The first five engines were built in Germany by Hanomag in 1923.
Polish production started in 1928 and lasted until 1934 after which 185 locomotives had been manufactured by Fablok in Chrzanów.
Polish versions of the locomotive bore some improvements and changes compared with German ones, and were similar to PKP class Ty23.
[clarification needed] Ok22 locomotives were the first on the PKP to be equipped with electric lights.
[citation needed] After the German invasion of Poland in World War II, most Ok22 locomotives were taken into the Deutsche Reichsbahn fleet as 38 4501 to 38 4630.