The word was first used in the 1920 play "R.U.R. (Rossum's Universal Robots)" by Czech writer Karel Čapek. In the play, "robots" are artificial people created to do manual labor.
While Čapek himself did not invent the word, he popularized it and it quickly became associated with the idea of artificial beings that could perform tasks.