Ultimately from either Ancient Greek -ισμός (-ismós), a suffix that forms abstract nouns of action, state, condition, doctrine; from stem of verbs in -ίζειν (-ízein) (whence English -ize), or from the related suffix Ancient Greek -ισμα (-isma), which more specifically expressed a finished act or thing done.
Many English nouns in -ism are loans of Greek nouns in -ισμός (mostly via Latin and French), such as Judaism from Ἰουδαισμός (a learned English formation based on Latin, coined ca. 1500). In Late Latin, the -ismus suffix became the ordinary ending for names of religions and ecclesiastical or philosophical systems or schools of thought, thus chrīstiānismus (whence 16th c. Christianism) in Tertullian, a trend continued in Medieval Latin, with e.g. pāgānismus attested by the 8th century. From the 16th century, such formations became very common in English, until the early 18th century mostly restricted to either root words of Greek or Latin origin (heroism, patriotism) or proper names (Calvinism, Lutheranism). Productivity from root words with evidently non-Latin and non-Greek origin dates to the late 18th century (e.g. blackguardism). Reflecting this productivity, use of ism as a standalone noun is attested by Edward Pettit (1680) and becomes common from the mid 18th century. The narrowed sense of forming terms for ideologies based on the belief of superiority is a "draft addition" submitted to OED in 2004, based on coinages such as racism (1932) or sexism (1936) and productive since the 1970s.
Borrowed from French -isme.