According to Etymology Online, the term was first attested in 1706 as am not, and it was used with that sense until the early 19th century, when it began to be used as a generic contraction for are not, is not, etc. in the Cockney dialect of London. It was then "popularized by representations of this in Dickens, etc., which led to the word being banished from correct English."
The shift from /ænt/ to /eɪnt/ parallels a similar change some dialects made to can't. In other dialects, the pronunciation shifted to /ɑːnt/, and the spelling aren't, when used to mean “am not”, is due to the fact that both words are pronounced /ɑːnt/ in some non-rhotic dialects. Historically, ain't was present in many dialects of the English language, but not in the southeastern England dialect that became the standard, where it is only found in the construction ain't I.
- (dialectal or informal) Am not.
- (dialectal or informal) Are not, aren’t; is not, isn’t; am not.
- Our attitude’s queer and quaint —
- You’re wrong if you think it ain’t, oh!
1964, Bob Dylan, It Ain't Me Babe:
- It ain't me you're looking for.
- (dialectal or informal) Have not, haven’t; has not, hasn’t, when used as an auxiliary.
2006, Bob Dylan, Nettie Moore:
- Got a pile of sins to pay for and I ain't got time to hide / I'd walk through a blazing fire, baby, if I knew you was on the other side.