From American Heritage Dictionary
Ax, a common nonstandard variant of ask, is often identified as an especially salient feature of African American Vernacular English. While it is true that the form is frequent in the speech of African Americans, it used to be common in the speech of white Americans as well, especially in New England. This should not be surprising since ax is a very old word in English, having been used in England for over 1,000 years. In Old English we find both ascian and acsian, and in Middle English both asken and axen. Moreover, the forms with cs or x had no stigma associated with them. Chaucer used asken and axen interchangeably, as in the lines "I wol aske, if it hir will be/To be my wyf" and "Men axed hym, what sholde bifalle," both from The Canterbury Tales. The forms in x arose from the forms in sk by a linguistic process called metathesis, in which two sounds are reversed. The x thus represents (ks), the flipped version of (sk). Metathesis is a common linguistic process around the world and does not arise from a defect in speaking. Nevertheless, ax has become stigmatized as substandard—a fate that has befallen other words, like ain't, that were once perfectly acceptable in literate circles.