c. 1500, "a ceasing, an ending; a going away, act of leaving" (obsolete in this sense), from Old French departement "division, sharing out; divorce, parting" (12c.), from Late Latin departire "to divide" (transitive), from de- "from" (see de-) + partire "to part, divide," from pars (genitive partis) "a part, piece, a share, a division" (from PIE root *pere- (2) "to grant, allot").
French department came also to mean "group of people" (as well as "departure"), and from this by 1735 English had borrowed the sense of "separate division of a complex whole, separate business assigned to someone in a larger organization, distinct branch or group of activities" (science, business, manufacture, the military). The specific meaning "separate division of a government" is from 1769. As an administrative district in France, from 1792.
Department store "store that sells a variety of items, organized by department" is from 1878.
The "Department Store" is the outgrowth of the cheap counter business originated by Butler Brothers in Boston about ten years ago. The little "Five Cent Counter" then became a cornerstone from which the largest of all the world's branches of merchandising was to be reared. It was the "Cheap Counter" which proved to the progressive merchant his ability to sell all lines of wares under one roof. It was the Five Cent Counter "epidemic" of '77 and '78 which rushed like a mighty whirlwind from the Atlantic to the Pacific and all along its path transformed old time one line storekeepers into the wide-awake merchant princes of the present day. It was this same epidemic which made possible the world famed Department Stores of Houghton, of Boston; Macy, of New York; Wanamaker, of Philadelphia; and Lehman, of Chicago. ["American Storekeeper," 1885]