"pointed stick or post; stick of wood sharpened at one end for driving into the ground, used as part of a fence, as a boundary-mark, as a post to tether an animal to, or as a support for something (a vine, a tent, etc.)," Old English staca "pin, stake," from Proto-Germanic *stakon (source also of Old Norse stiaki "a stake, pole, candlestick,"Old Frisian stake, Middle Dutch stake, Dutch staak "a stake, post," Middle Low German stake "a stake, post, pillory, prison"), from PIE root *steg- (1) "pole, stick." The Germanic word was borrowed in Romanic (Spanish and Portuguese estaca "a stake," Old French estaque, estache, Italian stacca "a hook"), and was borrowed back as attach.
Meaning "post to which a person condemned to death by burning is bound" is from c. 1200, also "post to which a bear to be baited is tied" (late 14c.). Meaning "vertical bar fixed in a socket or in staples on the edge of the bed of a platform railway-car or of a vehicle to secure the load from rolling off, or, when a loose substance, as gravel, etc., is carried, to hold in place boards which retain the load," is by 1875; hence stake-body as a type of truck (1903).
Pull up stakes was used c. 1400 as "abandon a position" (the allusion is to pulling up the stakes of a tent); the modern American English figurative expression in the sense of "move one's habitation" is by 1703.