"Algorithm comes from the name of an Arab mathematician, in full Abu Jafar Mohammed ibn-Musa al-Khwarizmi (c. 780 c. 850), who lived and taught in Bagdhad and whose works in translation introduced Arabic numerals to the West. The last part of his name literally means man from Khwarizm, a town on the borders of Turkmenistan, now called Khiva. The Arabic system of numeration and calculation, based on 10, of which he was the exponent, became known in Arabic by his name - al-khwarizmi. This was borrowed into medieval Latin as algorismus (with the Arabic -izmi transformed into the Latin suffix -ismus, -ism).
In Old French algorismus became augorime, which was the basis of the earliest English form of the word, augrim. From the 14th century onwards, Latin influence gradually led to the adoption of the spelling algorism in English. This remains the standard form of the word when referring to the Arabic number system; but in the late 17th century an alternative version, algorithm, arose owing to association with Greek arithmos, number (source of arithmetic), and this became established from the 1930s onwards as the term for a step-by-step mathematical procedure, as used in computing."
~ John Ayto "Dictionary of Word Origins."