"nearest in place, position, rank, or turn," Middle English nexte, from Old English niehsta, nyhsta (West Saxon), nesta (Anglian) "nearest in position or distance, closest in kinship," superlative of neah (West Saxon), neh (Anglian) "nigh;" from Proto-Germanic *nekh- "near" + superlative suffix *-istaz. Cognate with Old Norse næstr, Dutch naast "next," Old High German nahisto "neighbor," German nächst "next."
In reference to time by c. 1200. Adverbial ("next to, immediately after; almost, within a little of") and prepositional ("nearest to, immediately adjacent to") uses are from c. 1200. Phrase the next man "a typical person" is from 1857. Next-best "second best" is by 1670s.