From Latin 'deponere' (to put down) — removing rulers from power and laying down testimony both mean putting something down.
To remove from office or a position of power, especially a monarch; to testify or give evidence under oath.
From Old French 'deposer' (to put down, to remove from office, to give testimony under oath), a Romance remodeling of Latin 'dēpōnere' (to put down, to lay aside, to deposit), composed of 'dē-' (down, away from a higher position) and 'pōnere' (to put, to place, to set), from PIE *apo- (away) + *sinō- (to leave). The literal meaning is 'to put down' — to bring someone physically and figuratively down from a high position. The word operates on two intersecting planes in English: political (to remove a ruler from power) and legal (to give sworn testimony, a deposition
The two seemingly unrelated meanings of 'depose' — removing a king and giving legal testimony — are both ancient. Medieval chroniclers could use the same word for the toppling of Richard II in 1399 and for the sworn statements of witnesses at his trial, because both acts involved 'putting down': the king from his throne, the testimony onto the record.