The extensive experimental and computational search for multifunctional materials has resulted in the development of semiconductor and oxide systems, such as (Ga,Mn)N, (Zn,Cr)Te and HfO2, which exhibit surprisingly stable ferromagnetic signatures despite having a small or nominally zero concentration of magnetic elements. Here, we show that the ferromagnetism of (Zn,Cr)Te, and the associated magnetooptical and magnetotransport functionalities, are dominated by the formation of Cr-rich (Zn,Cr)Te metallic nanocrystals embedded in the Cr-poor (Zn,Cr)Te matrix. Importantly, the formation of these nanocrystals can be controlled by manipulating the charge state of the Cr ions during the epitaxy. The findings provide insight into the origin of ferromagnetism in a broad range of semiconductors and oxides, and indicate possible functionalities of these composite systems. Furthermore, they demonstrate a bottom-up method for self-organized nanostructure fabrication that is applicable to any system in which the charge state of a constituent depends on the Fermi-level position in the host semiconductor.