Said to be the fate of women who die old maids, an afterlife punishment for their failure to go forth and multiply. As far as I can tell, the exact origins of the saying are unknown, though the first usage listed by the OED dates to the 16th century. Readers may have encountered the phrase before in the works of William Shakespeare. Both The Taming of the Shrew and Much Ado About Nothing make reference to leading apes into hell (not surprising given the subject matter of those plays).
H.W. Jansen suggests a somewhat different meaning for the phrase in his Apes and Ape Lore in the Middle Ages and the Renaissance. According to Jansen, leading apes into hell is not a punishment for old maids; it is a description of the dire consequences of female celibacy. By the time of the Renaissance, the ape was already well-established as a symbol for fornication. Women, by refusing to marry, forced men to seek sex outside of the marriage union, thus making them fornicators or apes. What the saying suggests is that old maids lead otherwise good men to sin, placing their immortal souls in jeopardy. Thus, a woman who does not marry leads apes into hell.
I would use Jansen’s theory with caution, however. This may or may not be just another attempt to make sense of the often totally nonsensical history of the English language.