1892, in C.G. Chaddock's translation of Krafft-Ebing's "Psychopathia Sexualis," from German homosexual, homosexuale (by 1880, in Gustav Jäger), from homo-, comb. form of Greek homos "same" (see homo- (1)) + Latin-based sexual.
Sexual inversion (1883) was an earlier clinical term for it in English. The noun is recorded by 1895. In technical use, either male or female; but in non-technical use almost always male. Slang shortened form homo first attested 1929.