"coarse grass-like plant growing in wet places," Middle English segge, from Old English secg "sedge, reed, rush," according to Watkins from Proto-Germanic *sagjaz "plant with a cutting edge" (source also of Low German segge, German Segge), from suffixed form of PIE root *sek- "to cut," on notion of plant with "cutting" leaves.
Compare Old English secg, identical in form but meaning "sword;" and German schwertel-gras "sedge" from schwert "sword," also see the etymological sense of gladiolus). Old Irish seisg, Welsh hesgreed "rush" might represent a similar sense development from the same root. Often spelled seg, segg until the present form triumphed early 1900s. Related: Sedgy (early 14c., seggy).