Accurate chromosome segregation in meiosis requires dynamic changes in chromatin organization. In Drosophila melanogaster, upon completion of recombination, meiotic chromosomes form a single, compact cluster called the karyosome in an enlarged oocyte nucleus. This clustering is also found in humans; however, the mechanisms underlying karyosome formation are not understood. In this study, we report that phosphorylation of barrier to autointegration factor (BAF) by the conserved kinase nucleosomal histone kinase-1 (NHK-1; Drosophila Vrk1) has a critical function in karyosome formation. We find that the noncatalytic domain of NHK-1 is crucial for its kinase activity toward BAF, a protein that acts as a linker between chromatin and the nuclear envelope. A reduction of NHK-1 or expression of nonphosphorylatable BAF results in ectopic association of chromosomes with the nuclear envelope in oocytes. We propose that BAF phosphorylation by NHK-1 disrupts anchorage of chromosomes to the nuclear envelope, allowing karyosome formation in oocytes. These data provide the first mechanistic insight into how the karyosome forms.