1560s, "idle vagrant, sturdy beggar, one of the vagabond class," a word of shadowy origin, perhaps a shortened form of roger (with a hard -g-), thieves' slang for a begging vagabond who pretends to be a poor scholar from Oxford or Cambridge, which is perhaps an agent noun in English from Latin rogare "to ask." Another theory [Klein] traces it to Celtic (compare Breton rog "haughty"); OED says, "There is no evidence of connexion with F. rogue 'arrogant' " (the theory supported in Century Dictionary).
By 1570s, generally, as "dishonest, unprincipled person, rascal." In slight playful or affectionate use, "one who is mischievous," 1590s. Meaning "large wild beast living apart from the herd" is by 1859, originally of elephants. As an adjective, in reference to something uncontrolled, irresponsible, or undisciplined, by 1964. Also common in 17c. as a verb. Rogue's gallery "police collection of mug shots of notorious law-breakers" is attested from 1859.