Borrowed from Old Occitan eretge, from Medieval Latin herēticus, from Ancient Greek αἱρετικός (hairetikós, “able to choose”). Doublet of herético. Compare Portuguese herege.
Practice speaking and memorizing "hereje" and many other words and sentences in Spanish.