Specific recognition of their cognate amino acid substrates by the aminoacyl-tRNA synthetase enzymes is essential for the correct translation of the genetic code. For aspartyl-tRNA synthetase (AspRS), electrostatic interactions are expected to play an important role, since its three substrates (aspartate, ATP, tRNA) are all electrically charged. We used molecular-dynamics free-energy simulations and experiments to compare the binding of the substrate Asp and its electrically neutral analogue Asn to AspRS. The preference for Asp is found to be very strong, with good agreement between simulations and experiment. The simulations reveal long-range interactions that electrostatically couple the amino acid ligand, ATP, and its associated Mg2+ cations, a histidine side chain (His448) next to the amino acid ligand and a flexible loop that closes over the active site in response to amino acid binding. Closing this loop brings a negatively charged glutamate into the active site; this causes His448 to recruit a labile proton, which interacts favorably with Asp and accounts for most of the Asp/Asn discrimination. Cobinding of the second substrate, ATP, increases specificity for Asp further and makes the system robust towards removal of His448, which is mutated to a neutral amino acid in many organisms. Thus, AspRS specificity is assisted by a labile proton and a cosubstrate, and ATP acts as a mobile discriminator for specific Asp binding to AspRS. In asparaginyl-tRNA synthetase, a close homologue of AspRS, a few binding-pocket differences modify the charge balance so that asparagine binding predominates.