As FumbleFingers points out
This is an old idiom, little used today: according to Google Ngrams it has been declining steadily since the end of the 17th century. You should suspect that a phrase so little used in PDE will have drifted somewhat from its original meaning.
In the passage you cite it does not bear the sense you offer, Merriam-Webster 2.b “depending on whether” (alongside 2.a “depending on how”), but Merriam-Webster 1 “in accord with the way in which”. In fact, OED 1 gives only meanings closely related to M-W 1, but none similar to M-W 2. The A-Ant fascicle of OED 1 was published in 1884; clearly M-W 2 is a 20th-century extension.
The derivation of sense 1. is easy to discern. According as an adverb was from its first appearance in English roughly equivalent to the modern accordingly: it meant ‘in accord / concord / correspondence / agreement (with), consistently (with), correspondingly or proportionally (to)”. As here has one of its common senses—in the dictionary you point to, sense 2:
used to indicate by comparison the way that something happens or is done
Put the two together and you have “in accord with the way in which something happens or is done”—exactly the sense in which Hamilton uses it.
And it is no more difficult to see how the modern sense, “depending on how / whether”, arises out of that meaning. If matter A is required to be in some respect “in accord with” matter B, it is in that respect dependent on matter B. For instance, if we say that “Men are to be rewarded according as they deserve it”, then their rewards are dependent on their deserts.
4
The cited usage is in a letter written in the mid-1700s. It's not really idiomatically "valid" today, so I don't really see much point in attempting to "analyse" how *as* works there in terms of contemporary usage (which I assume is what most ELL users are interested in).
– FumbleFingers Reinstate Monica – 2014-08-14T14:55:43.0375FWIW, in the cited *according as the judges in their discretion shall direct to be inflicted [blah blah]*, the highlighted element doesn't exactly mean *depending on whether* - it means *in accordance with how*. – FumbleFingers Reinstate Monica – 2014-08-14T14:59:32.817
5This question appears to be off-topic because it's not about learning English. The OP already understands how this expression is used and doesn't need to learn it―they're just curious about its history. – snailplane – 2014-09-16T05:46:37.767