The invention discloses a preparation method and application of functionalized polyvinyl alcohol microspheres. The preparation method comprises the following steps: uniformly mixing polyvinyl alcohol microspheres, epoxy chloropropane and a hydrochloric acid solution, carrying out a stirring reaction for 1-5 hours in a water bath, and carrying out centrifuging, water cleaning and drying for later use after the reaction; uniformly mixing the obtained chloridized polyvinyl alcohol microspheres, tetrabutylammonium bromide, ethidene diamine and a sodium hydroxide solution, carrying out the stirring reaction for 4-10 hours in the water bath, and carrying out the centrifuging, ethanol cleaning and the drying for later use after the reaction; and uniformly mixing the obtained aminated polyvinyl alcohol microspheres with 2-(2-pyridine) azo-resorcinol, formaldehyde and distilled water, stirring for 6-18 hours in the presence of nitrogen, and carrying out the centrifuging, the ethanol cleaning and the drying after the reaction, so as to obtain an end product. The functionalized polyvinyl alcohol microspheres provided by the invention can be used for chelating heavy metal and detecting and processing divalent heavy metal ions in wastewater and have the characteristics of simple preparation condition, low cost, short detection response time and high adsorption capacity.