The solubility of apatite in anatectic melt plays an important role in controlling the trace-element compositions and isotopic signatures of granites. The compositions of glassy melt inclusions and nanogranitoids in migmatites and granulites are compared with the results of experimental studies of apatite solubility to evaluate the factors that influence apatite behavior during prograde suprasolidus metamorphism and investigate the mechanisms of anatexis in the continental crust. The concentration of phosphorus in glassy melt inclusions and rehomogenized nanogranitoids suggests a strong control of melt aluminosity on apatite solubility in peraluminous granites, which is consistent with existing experimental studies. However, measured concentrations of phosphorus in melt inclusions and nanogranitoids are generally inconsistent with the concentrations expected from apatite solubility expressions based on experimental studies. Using currently available nanogranitoids and glassy melt inclusion compositions, we identify two main groups of inclusions: those trapped at lower temperature and showing the highest measured phosphorus concentrations, and melt inclusions trapped at the highest temperatures having the lowest phosphorus concentrations. The strong inconsistency between measured and experimentally predicted P concentrations in higher temperature samples may relate to apatite exhaustion during the production of large amounts of peraluminous melt at high temperatures. The inconsistency between measured and predicted phosphorus concentrations for the lower-temperature inclusions, however, cannot be explained by problems with the electron microprobe analyses of rehomogenized nanogranitoids and glassy melt inclusions, sequestration of phosphorus in major minerals and/or monazite, shielding or exhaustion of apatite during high-temperature metamorphism, and apatite–melt disequilibrium. The unsuitability of the currently available solubility equations is probably the main cause for the discrepancy between the measured concentrations of phosphorus in nanogranites and those predicted from current apatite solubility expressions. Syn-entrapment processes such as the generation of diffusive boundary layers at the mineral-melt interface may also be responsible for concentrations of P in nanogranitoids and glassy melt inclusions that are higher than those predicted in apatite-saturated melt.