Water-dispersible CaF2 and Yb3+/Er3+ codoped CaF2 (CaF2:Yb3+/Er3+) nanocrystals with different sizes and different Yb3+ and Er3+ dopant concentrations were synthesized using ionic liquid 1-n-butyl-3-methyl imidazolium tetrafluoroborate as a fluorine source by the rapid microwave-assisted solvothermal method. It was found that the morphology, size and crystallinity of CaF2:Yb3+/Er3+ nanocrystals could be adjusted by using adenosine 5′-triphosphate disodium salt (ATP). Yb3+ and Er3+ ions were doped into CaF2 nanocrystals to enable upconversion luminescence emission, and the as-prepared CaF2:Yb3+/Er3+ samples exhibited upconversion luminescence upon excitation at 980nm. Confocal laser scanning microscopy images showed that the CaF2:Yb3+/Er3+ nanocrystals could be used for efficient labeling of human gastric carcinoma cells. Moreover, in vitro cytotoxicity experiments indicated that the as-prepared CaF2:Yb3+/Er3+ nanocrystals had essentially little cytotoxicity. These results indicate that the as-prepared CaF2:Yb3+/Er3+ nanocrystals are promising for the application as a luminescent label material in biological imaging.