This study investigated migration and transformation mechanism of P in waste activated sludge (WAS) during anaerobic fermentation (AF) process and the subsequent hydrothermal conversion (HTC) process. Control of pH during the AF processes was found to be significant, whereby the use of acidic (pH = 5.5) or alkaline conditions (pH = 9.5) facilitated the release of either apatite phosphorus (AP) or non-apatite inorganic phosphorus (NAIP) and organic phosphorus, respectively. At the same pH of 9.5, NaOH promoted the transfer of P into liquid phase, and P in the solid phase was mainly in the form of NAIP. In contrast, Ca(OH)2 enhanced the incorporation of P into the solid products, with the P mainly in the form of AP. The subsequent HTC process promoted the NAIP transferred to AP, and the bioavailability of P in the HTC solid products was decreased. The P K-edge X-ray absorption near edge structure analysis provided detailed information about the phosphates. It demonstrated that the conversion of Ca8H2PO4•6.5H2O to Ca5(PO4)3•OH was facilitated by HTC under the alkaline condition. This study sheds lights on transformation mechanism of P speciations during AF and HTC processes, which would provide fundamental information for effective utilization of P in bio-wastes.