rank (v.) Look up rank at Dictionary.com
1570s, "arrange in lines;" 1590s, "put in order, classify; assign a rank to," from rank (n.). Related: Ranked; ranking.
rank (n.) Look up rank at Dictionary.com
early 14c., "row, line series;" c.1400, a row of an army, from Old French renc, ranc "row, line" (Modern French rang), from Frankish *hring or some other Germanic source (compare Old High German hring "circle, ring"), from Proto-Germanic *hringaz "circle, ring, something curved" (see ring (n.1)).

Meaning "a social division, class of persons" is from early 15c. Meaning "high station in society" is from early 15c. Meaning "a relative position" is from c.1600.
rank (adj.) Look up rank at Dictionary.com
Old English ranc "proud, overbearing, showy," from Proto-Germanic *rankaz (cognates: Danish rank "right, upright," German rank "slender," Old Norse rakkr "straight, erect"), perhaps from PIE *reg- "to stretch, straighten" (see right (adj.)). In reference to plant growth, "vigorous, luxuriant, abundant, copious" it is recorded from c.1300. Related: Rankly; rankness.

Sense evolved in Middle English to "large and coarse" (c.1300), then, via notion of "excessive and unpleasant," to "corrupt, loathsome, foul" (mid-14c.), perhaps from influence of Middle French rance "rancid." In 17c. also "lewd, lustful."

Much used 16c. as a pejorative intensive (as in rank folly). This is possibly the source of the verb meaning "to reveal another's guilt" (1929, underworld slang), and that of "to harass, abuse," 1934, U.S. black dialect, though this also may be from the role of the activity in establishing social hierarchy (from rank (n.)).