The Slavic first palatalization is a Proto-Slavic sound change that manifested as regressive palatalization of inherited Balto-Slavic velar consonants.
An important tendency in Proto-Slavic - a tendency that also operated throughout the Common Slavic period (ca. 300 to 1000 CE) and was the direct cause of the first palatalization - was so-called intrasyllabic synharmony. Such intrasyllabic synharmony was violated if a velar consonant occurred before a front (palatal) vowel, because a velar is articulated in the region of soft palate (velum), in the back part of the roof of the mouth, and front vowels, of course, in the front part of the mouth. Speakers resolve this articulatory opposition by adapting (assimilating) the articulation of the velar consonant to the front vowel, relocating it to the region of the front soft palate (palatum) - i.e.: it becomes palatalized.
This phenomenon occurs very commonly in the phonetic history of languages. Velar palatalization before front vowels has also marked (for example) the evolution of almost all modern Romance languages.
Inherited velars *k (< PIE *k, *kʷ) and *g (< PIE *g, *gʰ, *gʷ, *gʷʰ) change before Proto-Slavic front vowels *e/ē, *i/ī (PIE *e/ē, *i, *ey/ēy, *ew/ēw > OCS e/ě, ь, i, 'u), and also before the palatal semivowel *j:
The Proto-Slavic velar fricative *x, which was absent in PIE and arose primarily from PIE *s by means of the RUKI law or from word-initial PIE #sk- (as well as from Germanic and Iranian borrowings), changed in the same environment as: