Not to be confused with Treasure Map, a decorative furniture item.
The Pirate Map is a Hardmodeevent-summoning item used to summon a Pirate Invasion. The Pirate Map has a 1/100 (1%) chance of dropping from most enemies killed in the surface Ocean biome during Hardmode (see Notes for more details).
In order for it to be used, at least one player must have 200 health or more.[1]
Notes
The Pirate Map can only drop if the following conditions are met:[2]
The world is in Hardmode.
The enemy can drop at least 1 CC (i.e. statue-spawned enemies, Meteor Heads, etc. cannot drop Pirate Map).
The enemy is within 380 tiles of either side of the world.
The enemy is located above 10 tiles below the border between surface and underground.
Although Pirate Maps can only be obtained in Hardmode, they can be used to summon Pirate invasions even in pre-Hardmode worlds.
Tips
Arapaimas are too big to fit in 2-block gaps, making farming relatively safe. Note that on Desktop, Console, and Mobile versions, fish enemies are no longer attracted by players in an unconnected water body.
Perhaps the easiest way to farm Pirate Maps is to stay just above the Ocean water (Water Walking Boots or a small platform will work). Use a Water Candle and/or Battle Potion to increase the spawn rate and farm enemies, and they eventually will drop a Pirate Map. Minions can be helpful during the farming process.
During a Blood Moon, enemies will spawn at an even higher rate, which can be stacked with Water Candle and Battle Potion buffs. This practically ensures the drop of several Pirate Maps.
Creating a Graveyard(Desktop, Console and Mobile versions) mini-biome near the Ocean will raise enemy spawn rates even during the day, allowing quick farming.
The King Slime can be used as a good source for farming Pirate Maps.
With Neptune's Shell and minions, along with any minion boost gear available (such as Spider armor), stand on the Ocean floor while the minions kill incoming enemies.
In Crimson worlds, place a contained area of Crimson to one side of the Ocean so Blood Jellies spawn, which will be more frequent than ordinary Ocean spawns.
If the Jungle is close enough to overlap the Ocean, Arapaimas will spawn frequently. A Jungle can be created artificially near the Ocean.
In Corrupt worlds, it is helpful to corrupt the Ocean using Unholy Water or a Clentaminator and grind the Eater of Worlds for maps. Since there are about 50 parts per boss, around every 2 bosses will probably drop at least one map.
Pirates themselves can drop Pirate Maps if fought within the Ocean biome, which can make farming easier. This also applies to all other invasion enemies, such as the Goblin Army and Frost Legion.
(Desktop, Console and Mobile versions) The Guide mentions the Pirate Map in a tip: "I think I saw a treasure map floating around in the ocean once, but a shark ate it. Maybe you should go try and find one?"
However, Pirate Maps can drop from any Ocean enemy, not only from Sharks.
↑Information taken from the Desktop1.4.3.6 source code, methods CanStartInvasion() in Terraria.Main.cs and ItemCheck_UseEventItems() in Terraria.Player.cs. There may be inaccuracies, as the current Desktop version is 1.4.4.9.
↑Information taken from the Desktop1.4.4.9 source code, class PirateMap in Terraria.GameContent.ItemDropRules.Conditions.cs.