google
ref
late 19th century: from literate, on the pattern of illiteracy .
wiktionary
ref
From literate + -cy.
etymonline
ref
literacy (n.)
"ability to read and write," 1883, from literate + abstract noun suffix -cy. Illiteracy, however, dates back to 17c.