The utility of alkaline phosphatase in the precipitation of heavy metals such as Ni2+, Cd2+, Cr3+/6+, and Co2+ (from single-ion solutions as well as tannery and electroplating industrial effluents) under alkaline pH was studied with respect to bacterial alkaline phosphatase (enzyme from Escherichia coli C90) and calf intestinal alkaline phosphatase using ascorbic acid 2-phosphate, a natural substrate. Kinetic characteristics of both the enzymes at different regimes of pH 8–11 were studied to find the potential of the enzymes to remain active at certain environmental conditions. Maximum enzymatic activity was recorded at pH 9.5 and 10 for bacterial alkaline phosphatase and calf intestinal alkaline phosphatase, respectively. The precipitation of metal ions from single-ion solutions by bacterial alkaline phosphatase and calf intestinal alkaline phosphatase occurred in the order: Cd2+ > Ni2+ > Co2+ > Cr3+ > Cr6+ and Co2+ > Cd2+ > Ni2+ > Cr6+ > Cr3+, respectively. The percentage of precipitation of Cr6+ from tannery effluent (initial concentration 560 ppm) by bacterial alkaline phosphatase was found to be 15.57 % at 300 min while it was 71.47 % by calf intestinal alkaline phosphatase within 120 min. Bacterial alkaline phosphatase was found to be more efficient than calf intestinal alkaline phosphatase in removing Cd2+ from electroplating effluents from an initial concentration of 734 ppm, and the percentage of precipitation by the enzymes was 94.6 and 66 %, respectively. This work demonstrates a promising eco-friendly approach for a sustainable environment, as ascorbic acid 2-phosphate is a naturally occurring and biodegradable substrate.