Michal Oginski studied under Osip Kozlovsky from 1773 to 1778, when Kozlovsky served as the music teacher in the household of Andrzej Oginski near Warsaw. Kozlovsky, then about sixteen years old, instructed the eight‑year‑old Michal in piano and later in the basics of composition, forming the foundation of Oginski’s musical education.
During these years Kozlovsky accompanied his pupil to the Oginsky family’s cultural center in Slonim, the residence of Michal Kazimierz Oginski, where both teacher and student were exposed to a rich musical environment. Oginski later acknowledged in his memoirs that his lessons with Kozlovsky ended in 1778, but their friendly relationship continued for many years thereafter.