Heparan sulfate (HS) and chondroitin sulfate (CS) are highly sulfated polysaccharides with a wide range of biological functions. Heparan sulfate 2-O-sulfotransferase (HS-2OST) transfers the sulfo group from 3'-phosphoadenosine 5'-phosphosulfate (PAPS) to the 2-OH position of the hexauronic acid that is adjacent to N-sulfated glucosamine, whereas chondroitin sulfate 2-O-sulfotransferase (CS-2OST) transfers the sulfo group to the hexauronic acid that is adjacent to N-acetylated galactosamine. Here we report a systematic mutagenesis study of HS-2OST and CS-2OST based on their structural homology to estrogen sulfotransferase and HS 3-O-sulfotransferase isoform 3 (3-OST3), for which crystal structures exist. We have identified six residues possibly involved in binding to PAPS. HS-2OST carrying mutations of these residues lacks sulfotransferase activity and the ability to bind 3'-phosphoadenosine 5'-phosphate, a PAPS analogue, as determined by isothermal titration calorimetry. Similar residues involved in binding to PAPS were also identified in CS-2OST. Additional residues that participate in carbohydrate substrate binding were also identified in both enzymes. Mutations at these residues led to the loss of sulfotransferase activity but maintained the ability to bind to phosphoadenosine 5'-phosphate. The catalytic function of HS-2OST appears to involve two histidine residues (His140 and His142), whereas only one histidine (His168) of CS 2-OST is likely to be critical. This unique feature of HS 2-OST catalytic residues directed us to characterize the Drosophila heparan sulfate 2-O-sulfotransferase. The results from this study provide insight into the differences and similarities various residues play in the biological roles of the HS-2OST and CS-2OST enzymes.