1650s as a type of surgical instrument; 1760 as "one who takes or removes scalps," agent noun from scalp (v.).
The meaning "person who re-sells tickets at unauthorized prices for a profit" is by 1869 in American English; the earliest reference is to theater tickets, but it more often was used late 19c. of brokers who sold unused portions of railway tickets.
Railways charged less per mile for longer-distance tickets; a person traveling from New York to Chicago could buy a ticket to San Francisco, get off at Chicago and sell the ticket to a scalper, and have traveled more cheaply than if he had simply bought a ticket to Chicago. The Chicago scalper would hold the ticket till he found someone looking for a ticket to San Francisco, then sell it at a slight advance but for less than the official price.
Perhaps it is from scalp (v.) in some sense; scalper was a generic term for "con man, cheater" in late 19c. Or perhaps the connecting sense is the bounty offered for scalps of certain destructive animals (attested in New England from 1703) and the notion is "one who holds only part of something, but still gets a reward." Some, though, see a connection rather to scalpel, the surgical instrument.
1670s, "to deprive of the scalp, cut off (someone's) scalp," from scalp (n.), originally in reference to North American natives. For ticket re-selling sense, see scalper. Related: Scalped; scalping. Compare German skalpern, Danish skalpere, Swedish skalpera. French scalper is from Germanic. Similarity to Latin scalpere "to cut, carve" is accidental.