The depiction of pirates with pet parrots in fiction likely stems from the character of Long John Silver in "Treasure Island" by Robert Louis Stevenson. There is very little evidence to indicate real pirates kept parrots as pets, but there is some record of them selling parrots captured during their travels.
Parrots and parrot cages have been found listed among the inventory of ships and lists of personal possessions of pirates of the late 17th and early 18th centuries. With their bright coloration and the ability of some species to mimic human speech, parrots were popular as exotic pets in Europe and were more likely being transported for sale than kept as personal pets.
Stevenson admitted he got the idea for a pirate with a pet parrot from "Robinson Crusoe," in which the stranded narrator captures a parrot and keeps it as a pet. Depictions of pirates with parrots have been common since the publication of "Treasure Island." The Pittsburgh Pirates baseball team has used an oversized parrot as their mascot since 1979. In the "Pirates of the Caribbean" film series, a member of Jack Sparrow's crew is seen with a parrot on his shoulder. A parrot also appears amongst Captain Hook's crew in the 2003 "Peter Pan" film.