1520s, "to offer to indiscriminate sexual intercourse (usually in exchange for money)," from Latin prostitutus, past participle of prostituere "to expose to prostitution, expose publicly," from pro "before" (see pro-) + statuere "cause to stand, establish," from PIE root *sta- "to stand, make or be firm." Related: Prostituted; prostituting.
The notion of "sex for hire" is not inherent in the etymology, which rather suggests one "exposed to lust" or sex "indiscriminately offered." However, this is now almost the official European term for the institution: German prostituierte, Russian prostitutka, etc. Figurative sense (of abilities, etc.) is from 1570s. Of men, in reference to homosexual acts, from 1886 (in form prostitution); phrase male prostitute attested by 1948.