late 13c., "musical instrument, mechanical apparatus for producing musical sounds," from Old French instrument, enstrument "means, device; musical instrument" (14c., earlier estrument, 13c.) and directly from Latin instrumentum "a tool, an implement; means, furtherance; apparatus, furniture; ornament, dress, embellishment; a commission, authorization; a document," from instruere "arrange, prepare, set in order; inform, teach," literally "to build, erect," from in- "on" (from PIE root *en "in") + struere "to pile, build" (from PIE *streu-, extended form of root *stere- "to spread").
The word in other Germanic languages also is from French. In English the meaning "a means, an agency" is from mid-14c. The sense of "hand-tool, implement, utensil, something used to produce a mechanical effect" is from early 14c. "Now usually distinguished from a tool, as being used for more delicate work or for artistic or scientific purposes" [OED]. The legal meaning "written document by which formal expression is given to a legal act" is from early 15c. Formerly also used of body parts or organs with special functions.
In wyfhode I wol vse myn Instrument As frely as my makere hath it sent. [Chaucer, "Wife of Bath's Prologue"]