I Samuel - Chapter 8
King Me!
Having grown old because of the rigors of his job, Shmuel appointed his sons to assist him. They turned out to be unfit for the job; they took bribes and judged dishonestly. The Elders approached Shmuel and said that since he was getting too feeble to handle the task, and since his sons were unfit successors, he should appoint a king. G-d told Shmuel not to take it personally; the people were not rejecting Shmuel's leadership, but G-d's own! (When they requested this, they said "give us a king, like all the other nations," which was an improper motivation. Because of this, their first king would be a temporary ruler, rather than the permanent Davidic dynasty.)
Shmuel didn't like the Jews' request and tried to discourage them by relating all the powers a king would exercise, including taxation and confiscation of property. But the people would not be swayed and G-d told Shmuel to do as they asked.
(That the nation would eventually demand a king is foretold by the Torah in Deuteronomy chapter 17.)