The invention relates to functionalized ionic liquid containing a phosphorus and oxygen structure with a general formula of A+ B-, which is characterized in that A+ is shown in a formula (I), and R 1 and R 2 are defined in the specification; and B- is Cl-, Br-, I -, BF4-, PF6-, NO3-, CF3SO3-, [(CF3SO2) 2N] - or CH3CO2-. The invention also relates to a method for preparing ionic liquid with the formula of A + B-, which comprises the following steps: a compound in a formula (III) is reacted with a compound in a formula (II ') to obtain a compound in a formula (II'') , and then a compound in a formula (II'') is reacted with a compound in a formula (IV) to obtain a halide ionic liquid A + B-, wherein B- is Cl-, Br-or I-, and ionic liquids with the other anions can be obtained by carrying out the ion exchange of the halide ionic liquid. The invention also relates to application of the ionic liquids in extraction of uranium from uranium-containing water systems. HO-(CH2) nCH2-X (III).