Transparent glass-ceramics containing Ln3+-doped YF3 nanocrystals are successfully obtained under adequate thermal treatment of precursor sol–gel glasses for the first time, to the best of our knowledge. Precipitation of YF3 nanocrystals is confirmed by X-ray diffraction and high-resolution transmission electron microscopy images. An exhaustive structural analysis is carried out using Eu3+ and Sm3+ as probe ions of the final local environment in the nano-structured glass–ceramic. Noticeable changes in luminescence spectra, related to relative intensity and Stark structure of band components, along with remarkably different lifetime values, allow us to discern between ions residing in precipitated YF3 nanocrystals and those remaining in a glassy environment. A large fraction of optically active ions is efficiently partitioned into nanocrystals of small size, around 11 nm. Moreover, bright and efficient up-conversion, including very intense high-energy emissions in the UV range, due to 4- and 5-infrared photon processes, are achieved in Yb3+–Tm3+ co-doped samples. Up-conversion mechanisms are analysed in depth by means of intensity dependence on sensitiser Yb3+ concentration and pump power.