From Old English formest, fyrmest (“earliest, first, most prominent”), from Proto-Germanic *frumistaz, from the locative stem *fur-, fr- + the superlative suffix *-umistaz. The suffix *-umistaz was a compound suffix, created from the rarer comparative suffix *-umô (as in Old English fruma) + the regular superlative suffix *-istaz (English -est). Cognate with Old Frisian formest, Gothic (frumists). See for, first and Old English fruma for more.
The Old English suffix -mest was eventually conflated with the word most through folk etymology, so that it is now interpreted as fore + -most; former was back-formed analogically.